Contents

init(roundedRect:cornerSize:style:)

Creates a path containing a rounded rectangle.

Declaration

init(roundedRect rect: CGRect, cornerSize: CGSize, style: RoundedCornerStyle = .continuous)

Parameters

  • rect:

    A rectangle, specified in user space coordinates.

  • cornerSize:

    The size of the corners, specified in user space coordinates.

  • style:

    The corner style. Defaults to the continous style if not specified.

Discussion

This is a convenience function that creates a path of a rounded rectangle. Using this convenience function is more efficient than creating a path and adding a rounded rectangle to it.

See Also

Creating a path