Contents

touchesBegan(with:)

Informs the receiver that new set of touches has been recognized.

Declaration

func touchesBegan(with event: NSEvent)

Parameters

  • event:

    An event object representing the beginning of a touch.

Discussion

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

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

See Also

Touch and Gesture Events