I have 5 different tabs in my tabbar controller.
My intention is to be able to switch from one tab bar via code. For example I am currently in the 5th tab of the app and
Set selectedViewController property of UITabBarController:
selectedViewController
UITabBarController
self.myTabBarController.selectedViewController = myViewController;
Use as below
self.myTabBarController.selectedViewController = [self.myTabBarController.viewControllers objectAtIndex:0];