<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Shape/rect(uniformLeadingCorners:uniformTrailingCorners:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ShapePA2A19ConcentricRectangleVRszrlE4rect21uniformLeadingCorners0g8TrailingI0AeA4EdgeO6CornerO5StyleV_ANtFZ"
  },
  "title" : "rect(uniformLeadingCorners:uniformTrailingCorners:)"
}
-->

# rect(uniformLeadingCorners:uniformTrailingCorners:)

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

```
@export(implementation) static func rect(uniformLeadingCorners: Edge.Corner.Style, uniformTrailingCorners: Edge.Corner.Style) -> Self
```

## Parameters

`uniformLeadingCorners`

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

`uniformTrailingCorners`

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

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)