문제

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