How do I programmatically switch to another tab and go to the first view in the navigation stack ?
I can switch to a different tab.
self.tabBarContro
I assume you have UINavigationController
s in your UITabBarController
. If that's the case you can use popToRootViewControllerAnimated:
to go to the first view controller.
int index = 4;
self.tabBarController.selectedIndex = index;
[self.tabBarController.viewControllers[index] popToRootViewControllerAnimated:NO];