Instance Method


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


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



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


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?) -> UIView?

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