popToViewControllerAnimated 自 ios5 起不再有动画

发布于 2024-12-10 21:18:04 字数 350 浏览 0 评论 0原文

正如主题所述,调用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橘和柠 2024-12-17 21:18:04

好吧,在“viewWillDisappear”中调用“[super viewWillAppear]”有点......我的错!

Okay, calling "[super viewWillAppear]" in "viewWillDisappear" is sort of ... my bad!

維他命╮ 2024-12-17 21:18:04

遇到了同样的问题。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文