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

  • 相关阅读:
    报名用户主题看板
    有效线索主题看板 阿善有用 清洗转换具体怎么做
    意向客户主题看板 阿善看到 阿善用到 拉链表
    数据库建模 全量表导入
    git 阿善有用
    IDEA+git+码云
    Cloudera Manager的基本使用 阿善没用
    cloudera manager报错解决方案
    java-多态简述及实例
    java-简述接口及实例
  • 原文地址:https://www.cnblogs.com/jgCho/p/6606724.html
Copyright © 2011-2022 走看看