In the doc Coordinating Multiple Gesture Recognizers, it says:
UIKit normally allows the recognition of only one gesture at a time on a single view. ... For example, in a view that contains both pan and swipe gesture recognizers, swipes are never recognized.
With that being said, there are also some exceptions. For example, in a view with two UITapGestureRecognizer
s, the actions of both will get fired.
There's the UIGestureRecognizerDelegate
method gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:)
comes into play externally. But how can the system built-in gesture recognizers, such as UITapGestureRecognizer
, decide internally whether or not to work with other recognizers? Or, is there any difference between continuous gesture recognizers and discrete gesture recognizers as regards the behavior?