4
votes

I am using a view Controller which have contains tabbarcontroller(4 tabs). each tabbar have a navigation controller.

My question is viewcontroller which were used in navigation controller in that viewDidAppear does not call while viewWillAppear calls?

It works fine in iOS4.x but this condition came in iOS5.


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

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


I try way

In 'Y' i use

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

It will only run 'X' viewDidAppear one one time.

I Need it every time when view appears.

Please help Thanks

2
in your viewWillAppear, do you call [super viewWillAppear], if not, you should be.jbat100
i have check super also same result came..Ankit Bhardwaj

2 Answers

0
votes

You can set the delegate property of your UITabBarController and respond to the didSelectViewController: method to call code on the viewController (X) appropriately.

0
votes

i thunk you can make a uitabbarcontroller then hide the tabbar then when you will switch the view controller then just remove the hidden property..then such problem will not be shown i think so.....