Instance Method

hitTest:

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

Declaration

- (__kindof CALayer *)hitTest:(CGPoint)p;

Parameters

thePoint

A point in the coordinate system of the receiver's superlayer.

Return Value

The layer that contains thePoint or nil if the point lies outside the receiver’s bounds rectangle.

See Also

Hit Testing

- containsPoint:

Returns whether the receiver contains a specified point.