I have a UINavigationController inside a UITabBarController. When a user presses th开发者_JS百科e first tab, I want to reset the navigation controller back to the first screen instead of displaying whichever view they last selected in the navigation controller. Is there an easy way to reset the stack?
Thanks, Howie
-[UINavigationController popToRootViewControllerAnimated:] should do what you want.
Check this thread: http://www.iphonedevsdk.com/forum/iphone-sdk-development/2625-uinavigationcontroller-uitabbarcontroller.html
According to this thread you should reset the navigation controller in – tabBarController:didSelectViewController:
精彩评论