ViewDidAppear is not called, but viewWillAppear is called only in iOS5

I am using a view controller that contains a tabbarcontroller (4 tabs). each tab has a navigation controller.

My question is: does the viewcontroller that was used in the navigation controller in this view DidAppear not call when viewWillAppear is called?

It works great in iOS4.x, but this condition has appeared in iOS5.


viewcontroller | | tabbarcontroller (4 tabs) | | uinavigationController (Y) | | uiViewcontroller (X) 

In this controller "X", viewDidAppear did not call only in iOS 5, but it called in iOS44.x ??


I am doing my best

In 'Y' I use

 - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [viewController viewDidAppear:animated]; } 

It will only run the "X" viewDidAppear once.

I need this every time a view appears.

Please help Thanks

+4
source share
2 answers

You can set the delegation property of your UITabBarController and respond to the didSelectViewController: method to invoke the code on viewController (X) accordingly.

0
source

i thunk you can make uitabbarcontroller, then hide the panel, and then when you switch the view controller, and then just delete the hidden property. Then this problem will not be shown. I think so .....

0
source

All Articles