开发者

How to make a TabBar button loading always the first view of a NavigationController

How can I force a TabBar button to load always the first view of a NavigationController?

I don't want to load the last in 开发者_开发问答time loaded view but always come back to the first view of that NavigationController scheme.

Thank You very much!


Select the top view when you tap a TabBarItem like so:

 [someNaviagtionController popViewControllerAnimated:YES];

Depending on how you set your UITabBar up, call it either from tabBarController:shouldSelectViewController: or from tabBar:didSelectItem.


You can call popToRootViewControllerAnimated:. Take a look here for more info.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜