开发者

iPhone - Reset UINavigation Controller

开发者 https://www.devze.com 2022-12-23 01:53 出处:网络
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 whi

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:

0

精彩评论

暂无评论...
验证码 换一张
取 消