<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. 如何让导航栏后退按钮返回到另一个视图控制器

        How to get a uinavigation bar back button to return to anthother view controller(如何让导航栏后退按钮返回到另一个视图控制器)
        <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];
                  }
                  

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

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

                  相关文档推荐

                  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设置灯光状态栏文字颜色的正确方法)
                  <tfoot id='RbjJh'></tfoot>

                  • <legend id='RbjJh'><style id='RbjJh'><dir id='RbjJh'><q id='RbjJh'></q></dir></style></legend>
                        <tbody id='RbjJh'></tbody>

                          <bdo id='RbjJh'></bdo><ul id='RbjJh'></ul>
                        • <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>

                        • <small id='RbjJh'></small><noframes id='RbjJh'>