<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. 选择选项卡时弹出到根视图

        时间:2023-06-12

        <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.

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

                  上一篇:检测视图控制器何时从弹出窗口出现 下一篇:使用委托将数据传回导航堆栈

                  相关文章

                  <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>

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