【发布时间】:2013-08-20 23:49:58
【问题描述】:
演示时:
CATransition *animation=[CATransition animation];
animation.delegate=self;
animation.duration=0.3;
animation.type=kCATransitionMoveIn;
animation.subtype=kCATransitionFromRight;
UIViewController13 *vc = [[UIViewController13 alloc] init];
[self presentViewController:vc animated:NO completion:nil];
[vc.view.layer addAnimation:animation forKey:@"animation"];
但我不知道如何自定义关闭动画
【问题讨论】:
-
我认为你不能这样做我面临同样的问题,但我不能
-
当我问同样的问题时,我最终使用了
UINavigationController并且没有搞乱 iOS 默认行为。模态视图和被推送到导航堆栈的普通视图之间存在根本区别。改变它似乎很不合逻辑。 -
淡入淡出效果很简单,但是推送应该是另一种方式@RanjuPatel
-
谢谢! @SergiusGee
标签: ios objective-c uinavigationcontroller uiviewanimation