Contents

init(uniformLeadingCorners:topTrailingCorner:bottomTrailingCorner:)

Creates a rectangle with a corner style set on the leading two corners uniformly, and two other styles for the trailing two corners respectively.

Declaration

init(uniformLeadingCorners: Edge.Corner.Style = .concentric, topTrailingCorner: Edge.Corner.Style = .concentric, bottomTrailingCorner: Edge.Corner.Style = .concentric)

Parameters

  • uniformLeadingCorners:

    The corner style to apply to the leading two corners uniformly.

  • topTrailingCorner:

    The corner style for the top trailing corner.

  • bottomTrailingCorner:

    The corner style for the bottom trailing corner.

Discussion

For the two leading corners, the system calculates the radius for each corner first. Then, it selects the largest radius and applies it to each leading corner to achieve the symmetric look.

See Also

Creating a rectangle with uniform leading corners