Forwarding UIGesture to views behind

后端 未结 5 1357
长情又很酷
长情又很酷 2020-11-29 20:21

I am working on an iphone (iOS 4.0 or later) app and having some troubles with touch handling between multiple views. I am having a view structure like this

         


        
5条回答
  •  野性不改
    2020-11-29 20:55

    I would suggest you to use below line of code where needed may help you out.

    //--->for bview gesture to detect swipe
    [pinch requireGestureRecognizerToFail:leftSwipe]; && 
    [pinch requireGestureRecognizerToFail:rightSwipe];
    
    //--->for aview gesture to detect pinch
    [rightSwipe requireGestureRecognizerToFail:rightSwipe]; ||
    [leftSwipe requireGestureRecognizerToFail:pinch];
    

提交回复
热议问题