zoukankan      html  css  js  c++  java
  • iOS 当使用FD_FullscreenPopViewController的时候遇到scrollView右滑手势无法使用的解决

       当我们在ViewController中有scrollView的时候, 可能会遇到右滑无法响应返回手势, 有以下解决办法:

      自定义scrollView, 实现该scrollView的以下方法即可:

    @implementation GOfflineContentScrollView

     

    -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer

    {

        // 首先判断otherGestureRecognizer是不是系统pop手势

        if ([otherGestureRecognizer.view isKindOfClass:NSClassFromString(@"UILayoutContainerView")]) {

            // 再判断系统手势的statebegan还是fail,同时判断scrollView的位置是不是正好在最左边

            if (otherGestureRecognizer.state == UIGestureRecognizerStateBegan && self.contentOffset.x == 0) {

                return YES;

            }

        }

        return NO;

    }

     

    @end

  • 相关阅读:
    Fiddler_AutoReponse_钓鱼网站原理和如何形成的&如何mock未开发好的页面来进行测试?
    HTTP 协议详解
    Appium元素定位-Toast
    Appium常用APi03
    Appium常用API 02
    Appium常用API_实现页面跳转(包括APP内部页面和APP 相互跳转)
    appium操作之手势操作-多点触摸(地图放大缩小)
    app自动化之手势(九宫格)滑动解锁
    常用 cmd 命令
    『转载』webGIS 概述
  • 原文地址:https://www.cnblogs.com/jgCho/p/6606724.html
Copyright © 2011-2022 走看看