Instance Method

point(inside:with:)

Returns a Boolean value indicating whether the receiver contains the specified point.

Declaration

func point(inside point: CGPoint, with event: UIEvent?) -> Bool

Parameters

point

A point that is in the receiver’s local coordinate system (bounds).

event

The event that warranted a call to this method. If you are calling this method from outside your event-handling code, you may specify nil.

Return Value

true if point is inside the receiver’s bounds; otherwise, false.

See Also

Hit Testing in a View

func hitTest(CGPoint, with: UIEvent?)

Returns the farthest descendant of the receiver in the view hierarchy (including itself) that contains a specified point.