popToViewControllerAnimated 自 ios5 起不再有动画
正如主题所述,调用 popToRootViewControllerAnimated
/ popToViewControllerAnimated
不再执行任何动画。
我使用的代码在 4.x 上运行得很好,
[self.navigationController popViewControllerAnimated:YES];
这里没什么特别的。我刚刚注意到,对于我在 iOS5 上运行的所有应用程序,流行动画都消失了。但是确实会出现推送动画。
现在我想知道如果需要定义该动画的过渡/样式,要搜索什么?
欢迎任何帮助,谢谢!
as topic describes, calling popToRootViewControllerAnimated
/ popToViewControllerAnimated
does not do any animation anymore.
the code I use, which works fine with 4.x, is simply
[self.navigationController popViewControllerAnimated:YES];
so nothing special here. I just noticed, that for all my apps, running on iOS5, pop-animations have been gone. push-animations however DO appear.
now i wonder what to search for, if there is the need to define the transition/style of that animation?
Any help welcome, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,在“viewWillDisappear”中调用“[super viewWillAppear]”有点......我的错!
Okay, calling "[super viewWillAppear]" in "viewWillDisappear" is sort of ... my bad!
遇到了同样的问题。 poptoRootViewControllerAnimated 的视图转换动画在 ios5.0 之前工作正常,但在 ios5 中不行。下面是修复它的简要说明。
我在视图 A 中实现了一个自定义选项卡栏。当我从 A 转换到视图 B 然后又返回时,视图转换动画停止从 B 到 A 工作。查看视图 A 及其所有子视图中的视图加载方法后,视图 A 中的 customTabBar 有 ViewDidAppear,它错误地在其中调用 [super viewWillAppear]。当我将其更正为 [super viewDidAppear] 时,弹出动画开始正常。
看起来像 iOS 5 之前的版本,这并不重要,但现在它确实重要了,而且理应如此。
Was having the same problem. view transition animation for poptoRootViewControllerAnimated was working fine pre ios5.0 but not in ios5. Below is a brief description to fix it.
I had implemented a custom Tab bar in view A. When I transitioned to view B from A and then back, the view transition animation stopped working for B to A. Upon looking at the view loading methods in view A and all its sub-views, my customTabBar in view A had ViewDidAppear that was erroneously calling [super viewWillAppear] inside it. When I corrected it to [super viewDidAppear] , the pop animation started happening OK.
Looks like pre iOS 5, it did not matter but now it does and rightfully so.