我的 UINavigationController 还在动画吗?
我有一系列的pushViewController和popViewController动作, 例如,我想弹出最上面的控制器,并将另外两个控制器一个推到另一个之上,然后我就将其全部动画化:
我如何询问 navigationController 是否仍在动画?防止两个动画同时发生?
在推送或弹出动画仍在运行期间,viewControllers 和visibleViewController 返回的值是多少?
埃亚勒
I have a series of pushViewController and popViewController actions,
e.g. I want to pop the topmost controller and push two other controllers one on top of the other and you I it all animated:
how can I ask the navigationController if it is still animating ? to prevent two animations from happening at the same time ?
what will be the values returned by the viewControllers and visibleViewController during the time the animation of a push or pop is still running?
Eyal
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您无法识别动画状态。
您可以将
animated
设置为NO
并将最后一个设置为YES
来执行弹出和第一次推送。或者您可以考虑使用setViewControllers:animated:
也是如此。否则,如果您确实想了解有关推送和弹出的信息,您可以查看委托方法。特别是
navigationController:didShowViewController:animated:
方法。I don't think you can identify the animation status.
You can do the pop and the first push with
animated
set toNO
and the last one set toYES
. Or you can consider usingsetViewControllers:animated:
too.Otherwise if you really want to be informed about pushing and popping, you can look at the delegate methods. Especially the
navigationController:didShowViewController:animated:
method.