Instance Method


Returns a Boolean value that indicates whether a point lies inside the parent’s coordinate system.


func contains(_ p: CGPoint) -> Bool



A CGPoint to test against.

Return Value

true if the point lies inside the parent’s coordinate system; otherwise false.

See Also

Hit Testing

Understanding Hit-Testing

Learn how find child nodes at a given point by using hit-testing.

func atPoint(CGPoint) -> SKNode

Returns the deepest visible descendant that intersects a point.

func nodes(at: CGPoint) -> [SKNode]

Returns an array of all visible descendants that intersect a point.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software