init(roundedRect:cornerRadii:style:)
Creates a path as the given rounded rectangle, which may have uneven corner radii.
Declaration
init(roundedRect rect: CGRect, cornerRadii: RectangleCornerRadii, style: RoundedCornerStyle = .continuous)Parameters
- rect:
A rectangle, specified in user space coordinates.
- cornerRadii:
The radius of each corner of the rectangle, specified in user space coordinates.
- style:
The corner style. Defaults to the
continousstyle if not specified.
Discussion
This is a convenience function that creates a path of a rounded rectangle. Using this function is more efficient than creating a path and adding a rounded rectangle to it.