ScrollView gesture recognizer eating all touch events

前端 未结 9 814
北恋
北恋 2020-11-27 03:45

I have a UIScrollView to which I added a single tap gesture recognizer to show/hide some UI overlay using:

UITapGestureRecognizer *singleTap = [         


        
9条回答
  •  情话喂你
    2020-11-27 04:12

    This worked for me in Swift 3 / Xcode 8

    self.scrollView.touchesShouldCancel(in: ** the view you want the touches in **)
    self.scrollView.canCancelContentTouches = false
    

    Good luck!

提交回复
热议问题