<small id='7S450'></small><noframes id='7S450'>

        <legend id='7S450'><style id='7S450'><dir id='7S450'><q id='7S450'></q></dir></style></legend>

        <tfoot id='7S450'></tfoot>
          <bdo id='7S450'></bdo><ul id='7S450'></ul>
      1. <i id='7S450'><tr id='7S450'><dt id='7S450'><q id='7S450'><span id='7S450'><b id='7S450'><form id='7S450'><ins id='7S450'></ins><ul id='7S450'></ul><sub id='7S450'></sub></form><legend id='7S450'></legend><bdo id='7S450'><pre id='7S450'><center id='7S450'></center></pre></bdo></b><th id='7S450'></th></span></q></dt></tr></i><div id='7S450'><tfoot id='7S450'></tfoot><dl id='7S450'><fieldset id='7S450'></fieldset></dl></div>
      2. 选择选项卡时弹出到根视图

        Pop to root view when tab is selected(选择选项卡时弹出到根视图)

        <small id='bIUIL'></small><noframes id='bIUIL'>

        <legend id='bIUIL'><style id='bIUIL'><dir id='bIUIL'><q id='bIUIL'></q></dir></style></legend>

          <i id='bIUIL'><tr id='bIUIL'><dt id='bIUIL'><q id='bIUIL'><span id='bIUIL'><b id='bIUIL'><form id='bIUIL'><ins id='bIUIL'></ins><ul id='bIUIL'></ul><sub id='bIUIL'></sub></form><legend id='bIUIL'></legend><bdo id='bIUIL'><pre id='bIUIL'><center id='bIUIL'></center></pre></bdo></b><th id='bIUIL'></th></span></q></dt></tr></i><div id='bIUIL'><tfoot id='bIUIL'></tfoot><dl id='bIUIL'><fieldset id='bIUIL'></fieldset></dl></div>
        • <tfoot id='bIUIL'></tfoot>
                <tbody id='bIUIL'></tbody>
              • <bdo id='bIUIL'></bdo><ul id='bIUIL'></ul>
                1. 本文介绍了选择选项卡时弹出到根视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在一些我认为可能很容易的事情上遇到了一些麻烦.I have a table in my root view controller, when a row is selected I push a new view and from there I go to another tab.

                  I've been having some trouble with something I thought might be easy. I have a table in my root view controller, when a row is selected I push a new view and from there I go to another tab.

                  我的问题是如何确保一旦用户点击第一个选项卡,导航控制器就会弹出到根目录?

                  My question is how do I make sure that as soon as the user taps the first tab the navigation controller will pop to root?

                  推荐答案

                  在选项卡栏上选择每个选项卡时调用以下委托.

                  Following delegate is called while each tab is selected on tabbar.

                  -(void) tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
                  

                  将以下代码放入此委托方法中.

                  Put following code inside this delegate method.

                  if ([viewController isKindOfClass:[UINavigationController class]]) 
                      {
                          [(UINavigationController *)viewController popToRootViewControllerAnimated:NO];
                      }
                  

                  它在我的应用上运行良好.

                  its working fine on my app.

                  这篇关于选择选项卡时弹出到根视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                  ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                  Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                  How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  How to get the previous viewcontroller that pushed my current view(如何获取推送我当前视图的上一个视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)

                  <small id='MQZ5B'></small><noframes id='MQZ5B'>

                    <bdo id='MQZ5B'></bdo><ul id='MQZ5B'></ul>

                      <i id='MQZ5B'><tr id='MQZ5B'><dt id='MQZ5B'><q id='MQZ5B'><span id='MQZ5B'><b id='MQZ5B'><form id='MQZ5B'><ins id='MQZ5B'></ins><ul id='MQZ5B'></ul><sub id='MQZ5B'></sub></form><legend id='MQZ5B'></legend><bdo id='MQZ5B'><pre id='MQZ5B'><center id='MQZ5B'></center></pre></bdo></b><th id='MQZ5B'></th></span></q></dt></tr></i><div id='MQZ5B'><tfoot id='MQZ5B'></tfoot><dl id='MQZ5B'><fieldset id='MQZ5B'></fieldset></dl></div>

                          <tbody id='MQZ5B'></tbody>

                          <tfoot id='MQZ5B'></tfoot><legend id='MQZ5B'><style id='MQZ5B'><dir id='MQZ5B'><q id='MQZ5B'></q></dir></style></legend>