BeanTransitionManager 0.2.1

BeanTransitionManager 0.2.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2015

Maintained by Stephen Walsh.



  • By
  • Stephen Walsh

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.