Contents

rect(uniformTopCorners:uniformBottomCorners:)

Creates a rectangle with a corner style uniformly set on the two top corners, and another style uniformly set on the two bottom corners.

Declaration

static func rect(uniformTopCorners: Edge.Corner.Style, uniformBottomCorners: Edge.Corner.Style) -> Self

Parameters

  • uniformTopCorners:

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

  • uniformBottomCorners:

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

Discussion

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

See Also

Creating a rectangle with uniform top and uniform bottom corners