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

  • 相关阅读:
    【BZOJ4318】OSU! 期望DP
    【BZOJ2956】模积和 分块
    【BZOJ4443】[Scoi2015]小凸玩矩阵 二分+二分图最大匹配
    【BZOJ2253】[2010 Beijing wc]纸箱堆叠 cdq分治
    【BZOJ3555】[Ctsc2014]企鹅QQ hash
    【BZOJ3238】[Ahoi2013]差异 后缀数组+单调栈
    【BZOJ2287】【POJ Challenge】消失之物 背包动规
    【BZOJ4517】[Sdoi2016]排列计数 组合数+错排
    【BZOJ4551】[Tjoi2016&Heoi2016]树 并查集
    【BZOJ2783】[JLOI2012]树 DFS+栈+队列
  • 原文地址:https://www.cnblogs.com/jgCho/p/6606724.html
Copyright © 2011-2022 走看看