A discrete gesture recognizer that tracks whether the user held down a mouse button for a minimum amount of time before releasing it.
- macOS 10.10+
Use a press gesture recognizer to configure which button must be held and the amount of time for which it must be held. You can also specify how far the mouse is allowed to move and still be considered a valid gesture.
Upon creation, the gesture recognizer is configured to recognize press gestures involving only the primary button. It also delays sending primary button events to the view by setting the
delays property to
YES. To change the set of buttons to track, modify the