<!--
{
  "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(uniformTopCorners:uniformBottomCorners:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ShapePA2A19ConcentricRectangleVRszrlE4rect17uniformTopCorners0g6BottomI0AeA4EdgeO6CornerO5StyleV_ANtFZ"
  },
  "title" : "rect(uniformTopCorners:uniformBottomCorners:)"
}
-->

# 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.

```
@export(implementation) 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.

---

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)