0
votes

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 another 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?

1

1 Answers

0
votes

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.