Instance Method

contains(_:)

Returns whether the receiver contains a specified point.

Declaration

func contains(_ p: CGPoint) -> Bool

Parameters

thePoint

A point in the receiver’s coordinate system.

Return Value

true if the bounds of the layer contains the point.

See Also

Hit Testing

func hitTest(CGPoint) -> CALayer?

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