1

Using the following code, I intercept taps with 3 fingers:

let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector( // selector here))
tapRecognizer.numberOfTouchesRequired = 3
tapRecognizer.numberOfTapsRequired = 1
self.view.addGestureRecognizer(tapRecognizer)

The code works as expected on iOS 12. On iOS 13 though, the action is not called.

Removing this line:

tapRecognizer.numberOfTouchesRequired = 3

Makes the action get called when the screen is tapped with one finger, but that's not the behaviour I am looking for.

What should I change in order to make the action get called when the screen is tapped with 3 fingers on iOS 13?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
user3673952
  • 698
  • 10
  • 30
  • 1
    Probably the gesture recognizer is conflicting with the new cut/copy/paste and/or undo/redo system gestures. You can use the `requireGestureRecognizerToFail`, `shouldRecognizeSimultaneouslyWithGestureRecognizer`, and `shouldReceiveTouch` APIs to adjust the behavior. – Aaron Brager Sep 20 '19 at 10:18
  • 1
    This appears to be a known bug in iOS 13, and should be fixed in iOS 13.1 https://www.theverge.com/2019/9/20/20876211/apple-ios-13-fortnite-pubg-mobile-gesture-bug-unplayable-broken-games – JoeGaggler Sep 23 '19 at 16:25

1 Answers1

1

iOS 13.1 was released today, which fixes the issue with numberOfTouchesRequired set to 3.

JoeGaggler
  • 1,207
  • 1
  • 13
  • 28