• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Pinterest style segue for expanding UIImageViews into detail views.

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.