3

I want my UITableView to scroll only when using two fingers. I realize this is not standard behavior but my app has a specific use case that users will understand. How do I do this so that two fingers scrolling works like one finger scrolling in every way while preventing one finger scrolling?

Craig Conover
  • 4,710
  • 34
  • 59
  • I dont think there is any straight forward method for this. – Adithya Mar 17 '14 at 11:12
  • 1
    possible duplicate of [Scrolling with two fingers with a UIScrollView](http://stackoverflow.com/questions/787212/scrolling-with-two-fingers-with-a-uiscrollview) – Mika Mar 17 '14 at 11:32
  • 1
    I was searching on UITableView and not UIScrollView. Thanks for pointing me in the right direction. Guto's solution did the trick. self.scrollView.panGestureRecognizer.minimumNumberOfTouches = 2; – Craig Conover Mar 17 '14 at 23:22

1 Answers1

2

As Mikael pointed out, this has been answered at Scrolling with two fingers with a UIScrollView

There are many answers over the years and Guto Araujo's answer did it for me. Just changed the scrollView to my tableView instance:

self.myTableView.panGestureRecognizer.minimumNumberOfTouches = 2;

I'll upvote Guto as soon as my rep is >= 15 Thanks Guto for the answer and Mikael for pointing in the right direction.

Craig Conover
  • 4,710
  • 34
  • 59