[![CI Status](http://img.shields.io/travis/Juan Uribe/JUOShrinkPresent.svg?style=flat)](https://travis-ci.org/Juan Uribe/JUOShrinkPresent)
JUOShrinkPresent is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JUOShrinkPresent', '~> 0.1.0'
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.
Juan Uribe, [email protected]
JUOShrinkPresent is available under the MIT license. See the LICENSE file for more info.