---
title: "rect(uniformTopCorners:uniformBottomCorners:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shape/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.

## Declaration

```swift
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

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

- [init(uniformTopCorners:uniformBottomCorners:)](swiftui/concentricrectangle/init(uniformtopcorners:uniformbottomcorners:).md)
