Instance Method


Asks the delegate if two gesture recognizers should be allowed to recognize their gestures simultaneously.


optional func gestureRecognizer(_ gestureRecognizer: NSGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: NSGestureRecognizer) -> Bool



The first gesture recognizer to be considered. This is the object with which the delegate is associated.


The second gesture recognizer to be considered.

Return Value

true to allow gestureRecognizer and otherGestureRecognizer to recognize their gestures simultaneously. If you do not implement this method, the default return value is false—no two gestures can be recognized simultaneously.


This method is called when recognition of a gesture by either gestureRecognizer and otherGestureRecognizer would block the other gesture recognizer from recognizing its gesture. Returning true is guaranteed to allow simultaneous recognition; returning false is not guaranteed to prevent simultaneous recognition because the other gesture recognizer’s delegate may return true.