Skip to content

A Pinterest style segue for expanding UIImageViews into detail views.

License

Notifications You must be signed in to change notification settings

phuoclinh/BeanTransitionManager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeanTransitionManager

[![CI Status](http://img.shields.io/travis/Stephen Walsh/BeanTransitionManager.svg?style=flat)](https://travis-ci.org/Stephen Walsh/BeanTransitionManager) Version License Platform

Description

BeanTransitionManager is a means for expanding UIImageViews into detail views in a way similar to that used in the Pinterest iOS app.

Alt text

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Implementing the transition effect is quite easy:

The source view controller should store a BeanTransitionManager property and initialise it using _beanTransitioningManager = [[BeanTransitionManager alloc] initWithExpandingImageView:self.imageView andTransitionDuration:1.0]; where the expandingImageView property is the imageView that you want to expand into the destination view controller.

The expandingImageView property of the BeanTransitionManager can be updated as need be using [self.beanTransitioningManager updateExpandingImageView:imageView]. A convienence method - (void)updateExpandingImageViewWithCell:atIndexPath:inCollectionView:onView:andDuration: for expanding UICollectionViewCells has also been included. A UICollectionViewCell subclass passed into this method must adhere to the BeanTransitionManagerCellExpanding protocol.

When segueing to the destination view controller assign the beanTransitioningManager property to the destination view controller's transitioning delegate: destinationViewController.transitioningDelegate = self.beanTransitioningManager;

The destination view controller must adhere to the BeanTransitionManagerDelegate protocol. This protocol only requires one readonly property delegateContentImageView which should return the destination imageView.

Requirements

iOS 7 or later.

Installation

BeanTransitionManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "BeanTransitionManager"

Author

Stephen Walsh, [email protected]

License

BeanTransitionManager is available under the MIT license. See the LICENSE file for more info.

About

A Pinterest style segue for expanding UIImageViews into detail views.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 68.3%
  • Shell 23.8%
  • Ruby 4.7%
  • C 3.2%