开发者

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

开发者 https://www.devze.com 2023-01-29 23:24 出处:网络
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 th

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

精彩评论

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