Two-Finger DragGesture()

Hi everyone!


How can one configure the DragGesture() to fire on two finger input instead of just one. In UIKit this was easily possilbe by setting the

minimumNumberOfTouches and maximumNumberOfTouches properties on UIPanGestureRecoginzer


Thanks in advance!

Max

I think many people have the same issue - and I do -. I want to combine 2 fingers pinch/rotate/drag gestures and leave 1 finger touch aside for other purposes.

One way is to create your own UIViewRepresentable with gesture recognizers from UIKit. But it's ugly and way more complicated than the SwiftUI version, that's too bad.

Did you manage to solve this problem in SwiftUI?
Two-Finger DragGesture()
 
 
Q