Instance Method

precisePreviousLocation(in:)

Returns a precise previous location for the touch, when available.

Declaration

func precisePreviousLocation(in view: UIView?) -> CGPoint

Parameters

view

The view that contained the touch.

Return Value

A precise previous location for the touch.

Discussion

Use this method to get additional precision for a touch’s previous location (when available). Do not use the returned point for hit testing. In some cases, hit testing can indicate that the touch is within a view, but hit testing against the more precise location may indicate that the touch is outside of the view.

See Also

Getting the Location of a Touch

func location(in: UIView?)

Returns the current location of the receiver in the coordinate system of the given view.

func previousLocation(in: UIView?)

Returns the previous location of the receiver in the coordinate system of the given view.

var view: UIView?

The view to which touches are being delivered, if any.

var window: UIWindow?

The window in which the touch initially occurred.

var majorRadius: CGFloat

The radius (in points) of the touch.

var majorRadiusTolerance: CGFloat

The tolerance (in points) of the touch’s radius.

func preciseLocation(in: UIView?)

Returns a precise location for the touch, when available.