UITabbarController与MoreNavigationController,PoptoRootViewController问题 [英] UITabbarController with MoreNavigationController , PoptoRootViewController issue
问题描述
请帮我解决这个问题。
我在我的应用程序中使用tabbarcontroller,
I am using tabbarcontroller in my App,
[tabBarController setViewControllers:突片]。
tabs包含viewcontrollers数组(6个viewcontrollers)。
[tabBarController setViewControllers:tabs]; tabs Contain array of viewcontrollers (6 viewcontrollers).
它会自动创建更多按钮。
It automatically created more button.
问题
当我从更多按钮打开任何视图控制器然后从索引0到2打开任何其他控制器,然后按更多按钮它保持最后打开的viewcontroller。
When I open any viewcontroller from more button and then open any other controller from index 0 to 2 , and then press more button it maintain the last opened viewcontroller .
例如:
more button tableviewcontroller
For Example: more button tableviewcontroller
screen:
现在,当我按下联系人时,请说
现在,当用户按任何其他标签栏时,如功能标签栏
现在当用户返回更多标签时它显示联系人的viewcontroller
但是当用户再次返回更多标签栏时,我希望应用程序能够poptorootviewcontroller,而只需更多tableviewcontroller。
推荐答案
你可以在更多标签中的视图控制器的ViewWillDisappear方法中执行此操作,调用方法将此视图弹出MoreViewNavigationController ,像这样:
You can do this by in the ViewWillDisappear method of view controller in More tab, call method to pop this view out of MoreViewNavigationController, like this:
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController popViewControllerAnimated:NO];
}
这篇关于UITabbarController与MoreNavigationController,PoptoRootViewController问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!