Contents

endTracking(_:with:)

Notifies the control when a touch event associated with the control ends.

Declaration

func endTracking(_ touch: UITouch?, with event: UIEvent?)

Parameters

  • touch:

    The touch object containing the final touch information.

  • event:

    The event object containing the touch event.

Discussion

This method is called at the end of a sequence of touch events inside the control’s bounds. Subclasses can override this method and use it to perform any actions relevant to the completion of the touch sequence. You should also use it to perform any cleanup associated with tracking the event.

If you override this method, you must call super at some point in your implementation. The default implementation updates the isTracking property of the control.

See Also

Tracking touches and redrawing controls