0

I know this is how you set an animation for modal storyboard segue or presentViewController:animated:completion:

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

But how do you set one for dismissing a view controller?

Tom Shen
  • 1,838
  • 3
  • 19
  • 40
  • 1
    Possible duplicate of [UIViewController – issue with custom dismiss transition](http://stackoverflow.com/questions/24085867/uiviewcontroller-issue-with-custom-dismiss-transition) – Badal Shah Feb 11 '16 at 09:42

1 Answers1

0

I went for a look at the UIViewControllerTransitioningDelegate codes and found out this method does it:

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
    return [[MyAnimationController alloc] init];
}
Tom Shen
  • 1,838
  • 3
  • 19
  • 40