Pop navigation controller and select tab?
Hi guys I have a navcontroller inside a tabbar. When I select a button inside the root view controller I push another view controller. In it I take some user input and have a finish button.
My problem is that when the user selects this button I want to go straight to a开发者_JAVA百科nother tab, but at the same time I want to pop to the root view controller in the current tab, so that the next time the user presses the tab he/she will go to its original state. Any ideas?
after pop the navigation controller call the setSelectedIndex:
on your tab bar controller instance.
and you can also handle your tab bar controller delegates
in your app delegate
-
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
here you can pop your navigation controller to root.
精彩评论