开发者

Is my UINavigationController still animating?

开发者 https://www.devze.com 2023-03-18 11:30 出处:网络
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:

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 vi开发者_运维技巧ewControllers and visibleViewController during the time the animation of a push or pop is still running?

Eyal


I don't think you can identify the animation status.

You can do the pop and the first push with animated set to NO and the last one set to YES. Or you can consider using setViewControllers: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.

0

精彩评论

暂无评论...
验证码 换一张
取 消