开发者

iPhone - Reset UINavigation Controller

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜