Instance Property

isTouchInside

A Boolean value indicating whether a tracked touch event is currently inside the control’s bounds.

Declaration

var isTouchInside: Bool { get }

Return Value

true if the location of the most recent touch event is inside the control’s bounds or false if it is not.

Discussion

While tracking of a touch event is ongoing, the control updates the value of this property to indicate whether the most recent touch is still inside the control’s bounds. The control uses this information to trigger specific events. For example, touch events entering or exiting a control trigger appropriate drag events.

See Also

Tracking Touches and Redrawing Controls

func beginTracking(UITouch, with: UIEvent?) -> Bool

Called when a touch event enters the control’s bounds.

func continueTracking(UITouch, with: UIEvent?) -> Bool

Called when a touch event associated with the control is updated.

func endTracking(UITouch?, with: UIEvent?)

Called when a touch event associated with the control ends.

func cancelTracking(with: UIEvent?)

Tells the control to cancel tracking related to the given event.

var isTracking: Bool

A Boolean value indicating whether the control is currently tracking touch events.