Scrolling with two fingers with a UIScrollView

后端 未结 14 613
长发绾君心
长发绾君心 2020-11-29 21:29

I have an app where my main view accepts both touchesBegan and touchesMoved, and therefore takes in single finger touches, and drags. I want to im

14条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 22:19

    For iOS 5+, setting this property has the same effect as the answer by Mike Laurence:

    self.scrollView.panGestureRecognizer.minimumNumberOfTouches = 2;
    

    One finger dragging is ignored by panGestureRecognizer and so the one finger drag event gets passed to the content view.

提交回复
热议问题