我知道这就是你为模态故事板segue或presentViewController:animated:completion
设置动画的方法:
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
return [[BounceAnimationController alloc] init];
}
但是你如何设置一个解雇视图控制器呢?
答案 0 :(得分:0)
我去看了一下UIViewControllerTransitioningDelegate代码,发现这个方法做到了:
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
return [[MyAnimationController alloc] init];
}