Type Method

bezierPathWithRoundedRect:cornerRadius:

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

Declaration

+ (instancetype)bezierPathWithRoundedRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius;

Parameters

rect

The rectangle that defines the basic shape of the path

cornerRadius

The radius of each corner oval. A value of 0 results in a rectangle without rounded corners. Values larger than half the rectangle’s width or height are clamped appropriately to half the width or height.

Return Value

A new path object with the rounded rectangular path.

Discussion

This method creates a closed subpath, proceeding in a clockwise direction (relative to the default coordinate system) as it creates the necessary line and curve segments.

See Also

Creating a UIBezierPath Object

+ bezierPath

Creates and returns a new UIBezierPath object.

+ bezierPathWithRect:

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

+ bezierPathWithOvalInRect:

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

+ 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.