<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 如何检测滑动?

      时间:2023-06-11

      <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 子类的便捷初始化使得子类常量初始化两次 下一篇:iphone navigationController : 在退出当前视图之前等待 uialertview 响应

                相关文章

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