I have a UITabBarController which containing 4 different UIViewControllers. On first tab there is a UINavigationViewController
UITabBarController
UIViewControllers
UINavigationViewController
Do the following, before trying to change tab:
UITabBarController *tab=self.tabBarController; if (tab){ NSLog(@"I have a tab bar"); [self.tabBarController setSelectedIndex:1]; } else{ NSLog(@"I don't have"); }