Contents

touchesEnded(with:)

Returns that a set of touches have been removed.

Declaration

func touchesEnded(with event: NSEvent)

Parameters

  • event:

    An event object representing the ending of a touch event.

Discussion

The system sends the event to the view under the touch in the key window. To get the set of touches that ended for this view (or descendants of this view) call touches(matching:in:) on event and pass ended for the phase.

This isn’t always the point of removal with the touch device. A touch that transitions from active to resting may be part of an touchesEnded(with:) set.

See Also

Touch and Gesture Events