Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top