当按下后退按钮时,返回 UINavigationViewController 中的上一个视图不会有动画效果
UITabBarController 是可能的应用程序的根。 每个选项卡的根是不同的 UINavigationViewController,我在其上推送 UITableViewController。
问题是,当我按下后退按钮时,导航栏会动画,但上一个表格视图会立即出现,而没有动画。 UITableViewController 和 UINavigationViewController 都不是子类,并且我没有任何用于弹出功能的自定义代码。
前段时间,当我在开发另一个iOS应用程序时,我没有遇到这样的问题。 唯一的区别是,现在我使用 XCode 4 和 iOS 5 SDK。
我花了很多时间来寻找答案,但没有找到类似的东西。
有什么线索吗?
UITabBarController is the root in may application.
The root of each tab is different UINavigationViewController on which I am pushing UITableViewController's.
The problem is that when I press on the back button the navigation bar animates, but the previous table view appears instantly without animation. Neither UITableViewController nor UINavigationViewController is sub-classed and I have no any custom code for pop functionality.
Some time ago, when I was working on the other iOS application, I had not such problem.
The only difference is that now I am working with XCode 4 and iOS 5 SDK.
I have spent a lot to find the answer but haven't found anything similar.
Any clue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我自己也为此苦苦挣扎了很长一段时间。就我而言,问题最终是我意外地覆盖了 viewDidAppear 而不是在我的自定义 UITabBarController 类中调用 [super viewDidAppear:animated] 。
一旦我摆脱了这个问题,问题就终于消失了。
I was struggling with this myself for quite a while. In my case the problem ended up being me accidentally overriding viewDidAppear and not calling [super viewDidAppear:animated] in my custom UITabBarController class.
Once I got rid of that the issue finally went away.
我终于找到了问题所在:
我不小心将我的根视图设置为窗口的子视图,
而不是
一旦我修复了它,问题就消失了:)
I have finally found the problem:
I have set accidentally my root view to be subview of the window
rather than
Once I have fixed it the problem gone:)
不要在后台线程中执行任何 UI 更新任务,也不要在 ios 7 中调度 asyncq 后台队列,如果您正在执行任何 ui 相关任务,请在主队列中执行。
这将解决导航控制器动画相关的问题。
Do not do any UI updation task in background thread or dispatch asyncq background queue in ios 7 ,if you are doing any ui related task then do it in main queue.Eg.
This will solve navigation controller animation related issue.