开发者

iPhone pop navigation controller when tab bar selected

I have a开发者_开发问答n iPhone app with a tab bar and in the first tab there is a UINavigationController. How can I force the navigation controller to popToRoot when selecting the tab? The default behaviour does this the second time you select it but I wish to do it on the first one.

Thanks


One way to do this would be to use UITabBarControllerDelegate’s –tabBarController:didSelectViewController: method to be notified when the user selects the navigation controller. Then, in that method, pop your navigation controller as desired.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜