Я создал жест для 2 и 3 пальца.
func addTwoFingerSwipeGesture() {
let gesture = UISwipeGestureRecognizer(target: self, action: "handleTwoFingerSwipe")
gesture.direction = .Left
gesture.numberOfTouchesRequired = 2 // 2 finger swipe
self.view.addGestureRecognizer(gesture)
}
func addThreeFingerSwipeGesture() {
let gesture = UISwipeGestureRecognizer(target: self, action: "handleThreeFingerSwipe")
gesture.direction = .Left
gesture.numberOfTouchesRequired = 3 // 3 finger swipe
self.view.addGestureRecognizer(gesture)
}
// Handle Swipe
func handleTwoFingerSwipe() {
print("2 finger swipe recognized")
}
func handleThreeFingerSwipe() {
print("3 finger swipe recognized")
}