<tfoot id='kUQAe'></tfoot>
  • <legend id='kUQAe'><style id='kUQAe'><dir id='kUQAe'><q id='kUQAe'></q></dir></style></legend>
    • <bdo id='kUQAe'></bdo><ul id='kUQAe'></ul>
  • <small id='kUQAe'></small><noframes id='kUQAe'>

    1. <i id='kUQAe'><tr id='kUQAe'><dt id='kUQAe'><q id='kUQAe'><span id='kUQAe'><b id='kUQAe'><form id='kUQAe'><ins id='kUQAe'></ins><ul id='kUQAe'></ul><sub id='kUQAe'></sub></form><legend id='kUQAe'></legend><bdo id='kUQAe'><pre id='kUQAe'><center id='kUQAe'></center></pre></bdo></b><th id='kUQAe'></th></span></q></dt></tr></i><div id='kUQAe'><tfoot id='kUQAe'></tfoot><dl id='kUQAe'><fieldset id='kUQAe'></fieldset></dl></div>
      1. UINavigationController 上的确认返回按钮

        Confirm back button on UINavigationController(UINavigationController 上的确认返回按钮)

            <tbody id='m0OEP'></tbody>

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

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

              <i id='m0OEP'><tr id='m0OEP'><dt id='m0OEP'><q id='m0OEP'><span id='m0OEP'><b id='m0OEP'><form id='m0OEP'><ins id='m0OEP'></ins><ul id='m0OEP'></ul><sub id='m0OEP'></sub></form><legend id='m0OEP'></legend><bdo id='m0OEP'><pre id='m0OEP'><center id='m0OEP'></center></pre></bdo></b><th id='m0OEP'></th></span></q></dt></tr></i><div id='m0OEP'><tfoot id='m0OEP'></tfoot><dl id='m0OEP'><fieldset id='m0OEP'></fieldset></dl></div>
              <legend id='m0OEP'><style id='m0OEP'><dir id='m0OEP'><q id='m0OEP'></q></dir></style></legend>
                • <tfoot id='m0OEP'></tfoot>
                • 本文介绍了UINavigationController 上的确认返回按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在为使用 UINavigationController 的应用程序使用 storyboard.我想在默认的后退按钮中添加一个确认对话框,这样用户就不会意外注销.有没有办法做到这一点?我发现当 UINavigationController 自动创建后退按钮时,我不能简单地访问它.

                  I am using the storyboard for my app which is using UINavigationController. I would like to add a confirmation dialog to the default back button so the user does not log out accidentally. Is there some way to do this? I have found that I cannot simply access the back button when it has be automatically created by the UINavigationController.

                  有什么想法吗?

                  推荐答案

                  很遗憾,这种方式无法拦截后退按钮.最接近的传真是使用您自己的 UIBarButtonItem 设置为 navigationItem.leftBarButtonItem 并设置一个动作来显示您的警报等.我有一个图形设计师创建看起来像的按钮图像标准的后退按钮.

                  Unfortunately, you can't intercept the back button in this way. The closest facsimile is to use your own UIBarButtonItem set to the navigationItem.leftBarButtonItem and set an action to display your alert etc. I had a graphic designer create button images that look like the standard back button.

                  顺便说一句,出于不同的原因,我需要拦截后退按钮.我敦促您重新考虑这种设计选择.如果您正在呈现用户可以进行更改的视图,并且您希望他们可以选择保存或取消恕我直言,最好使用保存"和取消"按钮而不是带有警报的后退按钮.警报通常很烦人.或者,明确说明您的用户所做的更改是在他们进行更改时提交的.那么这个问题就没有实际意义了.

                  As an aside, I needed to intercept the back button for a different reason. I urge you to reconsider this design choice. If you are presenting a view where users can make changes and you want them to have the choice to save or cancel IMHO it's better to use 'Save' and 'Cancel' buttons vs a back button with an alert. Alerts are generally annoying. Alternatively, make it clear that the changes your users are making are committed at the time they make them. Then the issue is moot.

                  这篇关于UINavigationController 上的确认返回按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)

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

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

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

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