Disable 2 finger scrolling in UIScrollView

后端 未结 4 960
醉酒成梦
醉酒成梦 2021-02-02 11:44

I\'d like to disable two-finger scrolling in my UIScrollView.
I subclassed it and tweaked its built-in gesture recognizers with the following code:



        
4条回答
  •  臣服心动
    2021-02-02 12:34

    I can confirm this is still an issue in iOS 8, but only when the UIPanGestureRecognizer is underlying a UIScrollView. Creating a UIView with a fresh UIPanGestureRecognizer and setting its maximumNumberOfTouches property works as expected.

    Submitted rdar://20890684 and copied to http://openradar.appspot.com/radar?id=6191825677189120. Please feel free to dupe.

提交回复
热议问题