【发布时间】:2010-12-12 16:55:59
【问题描述】:
如何强制 TabBar 按钮始终加载 NavigationController 的第一个视图?
我不想加载最后一次加载的视图,但总是返回到该 NavigationController 方案的第一个视图。
非常感谢!
【问题讨论】:
标签: iphone navigationcontroller tabbarcontroller
如何强制 TabBar 按钮始终加载 NavigationController 的第一个视图?
我不想加载最后一次加载的视图,但总是返回到该 NavigationController 方案的第一个视图。
非常感谢!
【问题讨论】:
标签: iphone navigationcontroller tabbarcontroller
点击TabBarItem 时选择顶视图,如下所示:
[someNaviagtionController popViewControllerAnimated:YES];
根据您设置UITabBar 的方式,从tabBarController:shouldSelectViewController: 或tabBar:didSelectItem 调用它。
【讨论】:
您可以拨打popToRootViewControllerAnimated:。
查看here 了解更多信息。
【讨论】: