Instance Method

pointInside:withEvent:

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

Declaration

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event;

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

YES if point is inside the receiver’s bounds; otherwise, NO.

See Also

Hit Testing in a View

- hitTest:withEvent:

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