Instance Method

touches(for:)

Returns the touch objects from the event that belong to the specified given view.

Declaration

func touches(for view: UIView) -> Set<UITouch>?

Parameters

view

The UIView object in which the touches originally occurred.

Return Value

A set of UITouch objects representing the touches that belong to the specified view.

See Also

Getting the Touches for an Event

var allTouches: Set<UITouch>?

Returns all touches associated with the event.

func touches(for: UIWindow)

Returns the touch objects from the event that belong to the specified window.

func coalescedTouches(for: UITouch)

Returns all of the touches associated with the specified main touch.

func predictedTouches(for: UITouch)

Returns an array of touches that are predicted to occur for the specified touch.