How to block a gesture from superview to subview?

前端 未结 6 1928
感动是毒
感动是毒 2020-12-30 11:32

I\'m writing a module that everytime I swipe on a view, two sub views with a half size of the view will be added. Those subviews have their own gestures (eg: pan,...). The f

6条回答
  •  离开以前
    2020-12-30 11:45

    try like this,

       - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
        return NO;
    }
    

提交回复
热议问题