popToViewControllerAnimated does not animate since

2019-02-25 14:48发布

问题:

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!

回答1:

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



回答2:

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.