Instance Method


Moves the receiver’s current point to the specified location.


func move(to point: CGPoint)



A point in the current coordinate system.


This method implicitly ends the current subpath (if any) and sets the current point to the value in the point parameter. When ending the previous subpath, this method does not actually close the subpath. Therefore, the first and last points of the previous subpath are not connected to each other.

For many path operations, you must call this method before issuing any commands that cause a line or curve segment to be drawn.

See Also

Constructing a Path

func addLine(to: CGPoint)

Appends a straight line to the receiver’s path.

func addCurve(to: CGPoint, controlPoint1: CGPoint, controlPoint2: CGPoint)

Appends a cubic Bézier curve to the receiver’s path.

func addQuadCurve(to: CGPoint, controlPoint: CGPoint)

Appends a quadratic Bézier curve to the receiver’s path.

func close()

Closes the most recently added subpath.

func removeAllPoints()

Removes all points from the receiver, effectively deleting all subpaths.

func append(UIBezierPath)

Appends the contents of the specified path object to the receiver’s path.

var cgPath: CGPath

The Core Graphics representation of the path.

var currentPoint: CGPoint

The current point in the graphics path.