【发布时间】:2014-02-10 05:42:26
【问题描述】:
是否可以改变 ViewContoller Pop 动画的方向。
现在,当我们按下 VC 时,它会显示动画 Slide Left-to-Right 和 Pop Right-to-Left。
但我想要在 Pop VC 上从左到右滑动动画。
我尝试使用UIViewAnimationTransition。
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelay:0.375];
[self.navigationController popViewControllerAnimated:NO];
[UIView commitAnimations];
但它没有我需要的从左到右滑动的动画。这是我得到的动画
typedef enum {
UIViewAnimationTransitionNone,
UIViewAnimationTransitionFlipFromLeft,
UIViewAnimationTransitionFlipFromRight,
UIViewAnimationTransitionCurlUp,
UIViewAnimationTransitionCurlDown,
} UIViewAnimationTransition;
【问题讨论】:
-
尝试:- 首先显示动画并在动画完成时弹出 Viewcontroller。
-
您找到解决方案了吗?
-
@Crashalot ,我已经为我使用的代码添加了答案,请检查。
标签: ios uiviewcontroller uinavigationcontroller