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

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

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

    1. <tfoot id='RM9oW'></tfoot>

      iOS 7 uinavigationcontroller 如何检测滑动?

      iOS 7 uinavigationcontroller how to detect swipe?(iOS 7 uinavigationcontroller 如何检测滑动?)

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

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

                本文介绍了iOS 7 uinavigationcontroller 如何检测滑动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在新的 iOS 7 UINavigationController 中,有一个滑动手势可以在视图之间切换.有没有办法检测或拦截手势?

                In the new iOS 7 UINavigationController, there is a swipe gesture to switch between views. Is there a way to detect or intercept the gesture?

                推荐答案

                交互式弹出手势识别器通过 UINavigationControllerinteractivePopGestureRecognizer 属性公开.您可以添加自己的控制器作为手势识别器的目标并做出适当的响应:

                The interactive pop gesture recognizer is exposed through UINavigationController's interactivePopGestureRecognizer property. You can add your own controller as a target of the gesture recognizer and respond appropriately:

                @implementation MyViewController
                
                ...
                
                - (void)viewDidLoad
                {
                    [super viewDidLoad];
                
                    [self.navigationController.interactivePopGestureRecognizer addTarget:self 
                                                                                  action:@selector(handlePopGesture:)];
                }
                
                
                - (void)handlePopGesture:(UIGestureRecognizer *)gesture
                {
                    if (gesture.state == UIGestureRecognizerStateBegan)
                    {
                        // respond to beginning of pop gesture
                    }
                    // handle other gesture states, if desired
                }
                
                ...
                
                @end
                

                这篇关于iOS 7 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(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                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设置灯光状态栏文字颜色的正确方法)
                  <tbody id='q3SCA'></tbody>
                <i id='q3SCA'><tr id='q3SCA'><dt id='q3SCA'><q id='q3SCA'><span id='q3SCA'><b id='q3SCA'><form id='q3SCA'><ins id='q3SCA'></ins><ul id='q3SCA'></ul><sub id='q3SCA'></sub></form><legend id='q3SCA'></legend><bdo id='q3SCA'><pre id='q3SCA'><center id='q3SCA'></center></pre></bdo></b><th id='q3SCA'></th></span></q></dt></tr></i><div id='q3SCA'><tfoot id='q3SCA'></tfoot><dl id='q3SCA'><fieldset id='q3SCA'></fieldset></dl></div>
                <legend id='q3SCA'><style id='q3SCA'><dir id='q3SCA'><q id='q3SCA'></q></dir></style></legend>
                  • <bdo id='q3SCA'></bdo><ul id='q3SCA'></ul>

                      <tfoot id='q3SCA'></tfoot>

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