If I normally load up a UITabBarController
and switch between views, it calls the viewWillAppear
of each view controller.
But it is not so.
I want to switch to another tab as soon as another tab is touched.
If I specify a tab to load up - for example [self.tabBarController setSelectedIndex:0]
in the viewWillAppear
of one of the tabs (say tab 4)... It goes immediately back to tab 0.
But after that.... it does not call the viewWillAppear
on any of the tabs when I switch between them.
For example, if I again go to tab 4, it does not come back to tab 0. I expect it to by a never ending cycle as I expect tab 0 to load up as soon as tab 4 is touch.
But it runs JUST ONCE !!
Why ??
Note: Question has been edited.