ingh.am
ingh.am

Reputation: 26752

Force UITabBarController to push to root

When I add views to my UINavigationController within a Tab and I then touch that tab again it pops to the root view. I was just wondering, is there any way to pop this to the root programmatically?

Upvotes: 1

Views: 438

Answers (1)

FeifanZ
FeifanZ

Reputation: 16316

Yes, configure a delegate for the tab bar. When the proper tab is pressed, call the popToRootViewControllerAnimated: method on the nav controller.

http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html

Upvotes: 3

Related Questions