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

    1. <tfoot id='IgZ0G'></tfoot>
      • <bdo id='IgZ0G'></bdo><ul id='IgZ0G'></ul>

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

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

      1. 如何让导航栏后退按钮返回到另一个视图控制器

        时间:2023-06-12
        <legend id='HJUPF'><style id='HJUPF'><dir id='HJUPF'><q id='HJUPF'></q></dir></style></legend>
          <tbody id='HJUPF'></tbody>

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

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

          • <tfoot id='HJUPF'></tfoot>

                • <bdo id='HJUPF'></bdo><ul id='HJUPF'></ul>

                • 本文介绍了如何让导航栏后退按钮返回到另一个视图控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何让 UINavigation 控制器导航到前一个视图而不是前一个视图.基本上我希望它跳回 2 个位置而不是默认位置.

                  How would I go about having a UINavigation controller navigate not to the previous view but the view before that. Basically I would like it to jump back 2 places instead of the default one.

                  我敢肯定,这是非常规的,但我现在只需要这样做.

                  This is unconventional I'm sure, but I just need to do it for now.

                   self.navigationItem.backBarButtonItem =
                      [[[UIBarButtonItem alloc] initWithTitle:@"Back"
                                                        style:UIBarButtonItemStyleBordered
                                                       target:nil
                                                       action:nil] autorelease];
                  

                  感谢您的帮助.

                  推荐答案

                  设置:

                  self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(goBack)] autorelease];
                  

                  然后创建一个方法-goBack

                  -(void)goBack
                  {
                     UIViewController *ctrl = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count - 2];
                     [self.navigationController popToViewController:ctrl animated:YES];
                  }
                  

                  这篇关于如何让导航栏后退按钮返回到另一个视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 clickedButtonAtIndex 中显示警报? 下一篇:通过视图控制器、标签栏控制器、导航控制器和视图控制器传递数据

                  相关文章

                  <tfoot id='RbjJh'></tfoot>

                • <legend id='RbjJh'><style id='RbjJh'><dir id='RbjJh'><q id='RbjJh'></q></dir></style></legend>
                        <bdo id='RbjJh'></bdo><ul id='RbjJh'></ul>
                    1. <i id='RbjJh'><tr id='RbjJh'><dt id='RbjJh'><q id='RbjJh'><span id='RbjJh'><b id='RbjJh'><form id='RbjJh'><ins id='RbjJh'></ins><ul id='RbjJh'></ul><sub id='RbjJh'></sub></form><legend id='RbjJh'></legend><bdo id='RbjJh'><pre id='RbjJh'><center id='RbjJh'></center></pre></bdo></b><th id='RbjJh'></th></span></q></dt></tr></i><div id='RbjJh'><tfoot id='RbjJh'></tfoot><dl id='RbjJh'><fieldset id='RbjJh'></fieldset></dl></div>

                    2. <small id='RbjJh'></small><noframes id='RbjJh'>