touches(matching:in:)
Returns the touch objects associated with the specified phase.
Declaration
func touches(matching phase: NSTouch.Phase, in view: NSView?) -> Set<NSTouch>Parameters
- phase:
The touch phase for which you want touches.
- view:
The view for which touches are wanted. Touches that target this view, or any of the view’s descendants will be returned. Passing
nilas the view gets all touches regardless of their targeted view.
Return Value
A set of applicable NSTouch objects.
Discussion
This method is only valid for gesture events (gesture, magnify, swipe, rotate, etc.).