rect(corners:isUniform:)
Creates a rectangle with the same corner style set on four corners.
Declaration
static func rect(corners: Edge.Corner.Style, isUniform: Bool = false) -> SelfParameters
- corners:
The corner style for all four corners.
- isUniform:
A Boolean value that indicates whether to apply the corner style on each corner individually or uniformly.
Discussion
When you provide false for isUniform, the system may calculate a different radius for each corner. This can happen when the rectangle is not centered within the container shape, or the container shape’s corners have different radii. When you provide true for isUniform, the system calculates the radius for each corner first. Then, it selects the largest radius and applies it to each corner to achieve the symmetric look.