Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.72 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.72 KB

JUOShrinkPresent

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

Installation

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

pod 'JUOShrinkPresent', '~> 0.1.0'

Usage

After installing, you just need to have an instance of JUOShrinkTransitioningDelegate and set it as the transitioningDelegate for your controller.

@property (strong, nonatomic) JUOShrinkTransitioningDelegate *shrinkTransitioningDelegate;
...
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
	
	if ([segue.identifier isEqualToString:@"presentViewController"]) {
		UIViewController *toVC = segue.destinationViewController;
		toVC.modalPresentationStyle = UIModalPresentationCustom;
		toVC.transitioningDelegate = self.shrinkTransitioningDelegate;
	}
}

If you want to customize the transition duration, shrink scale and other things you can use the JUOShrinkDelegate.

For more details go check the example project. To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Juan Uribe, [email protected]

License

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