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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top