Objective C: How to switch from one Tab bar to another via program
Set selectedViewController
property of UITabBarController
:
self.myTabBarController.selectedViewController = myViewController;
Use as below
self.myTabBarController.selectedViewController = [self.myTabBarController.viewControllers objectAtIndex:0];
Heres a simpler answer (if you know the index of the Tab Bar item is not in the "more" view controllers):just get a reference of the tabController and set the "selectedIndex" property
self.tabBarController.selectedIndex = 0;