Type Method

shapeNodeWithPoints:count:

Creates a shape node from a series of points.

Declaration

+ (instancetype)shapeNodeWithPoints:(CGPoint *)points count:(size_t)numPoints;

Parameters

points

An array of Core Graphics points. The points are relative to the node’s origin.

numPoints

The number of points in the array.

Return Value

A new shape node. The node is created with a path that starts at the first point in the array, joining each adjacent pair of points with a line segment.

See Also

Creating a Shape from an Array of Points

Creating a Shape Node from an Array of Points

Create jagged or smooth shapes from the same array of points.

+ shapeNodeWithSplinePoints:count:

Creates a shape node from a series of spline points.