I wasn't lucky with searching for this, so here we go ;)

I have a UIViewController with a custom UINavigationBar which pushes another UIViewController as subview.

Everything works fine except when I click the back button on the subview. The previews (first) view appears correctly, but not animated. The animation of the UINavigationBar is correct, only the views switch immediately.

The function - (void)viewWillAppear:(BOOL)animated of the first UIViewController gets called with NO for animated. This only happens when I test with iOS 5, not with iOS 4.

Does anyone know how to fix this?

Thanks for your help! Hannes

UPDATE 1

I just removed all custom code and just used the plain UINavigationBar (so no extra settings) and it still doesn't work with iOS 5. This is my code I use in the first ViewController to push the second ViewController:

[self.navigationController pushViewController:secondViewController animated:YES];

As I already mentioned - when I click the back button in the navigation bar on the second view the first view appears immediately without animation.

Any help would be appreciated! Thanks!

UPDATE 2

I feel like I'm getting closer to the issue, but still no solution:

I just added a custom UINavigationController where I just call [super popViewControllerAnimated:animated]. This get's called correctly (animated is YES) but the viewWillAppear of the first UIViewController gets NO as value for animated...

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top