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.
精彩评论