Type Method

bezierPathWithRect:

Creates and returns a new UIBezierPath object initialized with a rectangular path.

Declaration

+ (instancetype)bezierPathWithRect:(CGRect)rect;

Parameters

rect

The rectangle describing the path to create.

Return Value

A new path object with the rectangular path.

Discussion

This method creates a closed subpath by starting at the origin of rect and adding line segments in a clockwise direction (relative to the default coordinate system).

See Also

Creating a UIBezierPath Object

+ bezierPath

Creates and returns a new UIBezierPath object.

+ bezierPathWithOvalInRect:

Creates and returns a new UIBezierPath object initialized with an oval path inscribed in the specified rectangle

+ bezierPathWithRoundedRect:cornerRadius:

Creates and returns a new UIBezierPath object initialized with a rounded rectangular path.

+ bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:

Creates and returns a new UIBezierPath object initialized with a rounded rectangular path.

+ bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise:

Creates and returns a new UIBezierPath object initialized with an arc of a circle.

+ bezierPathWithCGPath:

Creates and returns a new UIBezierPath object initialized with the contents of a Core Graphics path.

- bezierPathByReversingPath

Creates and returns a new Bézier path object with the reversed contents of the current path.

- init

Creates and returns an empty path object.