NSPress object is a discrete gesture recognizer that tracks whether the user held a mouse button down for a minimum amount of time before releasing it. 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.
- macOS 10.10+
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
true. To change the set of buttons to track, modify the