I have a basic project created in xcode as a "Tab Bar Application", What I would like is to have the application on load switch to the 2nd tab if BOOL x is true.
Right now I have: (located in FirstViewController.m in viewDidLoad)
if(x){
[self.tabBarController setSelectedIndex:1];
}
This causes the selected tab at the bottom of the page to highlight the 2nd tab, however the view remains that of the first tab.
How would I go about changing the view to that of the 2nd tab?
See Question&Answers more detail:os