TTZoomTransition 1.0.3

TTZoomTransition 1.0.3

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

Maintained by Tamás Tímár.


Downloads

Total5,093
Week0
Month0

Installs

Apps107
Test Targets6
powered by Segment

GitHub

Stars8
Watchers1
Forks3
Issues1
Contributors1
Pull Requests0

Code

Files2
LOCLines of Code 75



  • By
  • Tamás Tímár

TTZoomTransition is a custom modal view controller transition which displays the presented view controller by zoom animation.

TTZoomTransition in action

Installation

You can use TTZoomTransition via CocoaPods. Add the following line to your Podfile:

Podfile

pod TTZoomTransition

Usage

Set modalPresentationStyle property of your modal view controller to UIModalPresentationCustom. Also set the transitioningDelegate property.

ModalViewController* modalVC = [[ModalViewController alloc] init];
modalVC.modalPresentationStyle = UIModalPresentationCustom;
modalVC.transitioningDelegate = self;

[self presentViewController:modalVC animated:YES completion:nil];

In your transitioning delegate implement the following methods of UIViewControllerTransitioningDelegate:

- (id <UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
    TTZoomTranstition* zoomTransition = [[TTZoomTranstition alloc] init];
    return zoomTransition;
}

- (id <UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
    TTZoomTranstition* zoomTransition = [[TTZoomTranstition alloc] init];
    zoomTransition.presenting = NO;
    return zoomTransition;
}

Demo

pod try TTZoomTransition

If you don't have CocoaPods on your machine, get it: [sudo] gem install cocoapods.

Requirements

  • iOS 9+

Contact

Tamás Tímár

License

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

Acknowledgements

Images in example are from Pixabay.