---
title: "corners(in:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/roundedrectangularshape/corners(in:)"
---

# corners(in:)

Resolved corners given a size. If the corner style of a shape is size-dependent, read the provided size and return values accordingly. This function could be called with a nil size when the size hasn’t been determined. In that case, return the best approximated value. For example, for a capsule shape, its corner radius is determined by the size. If size is not available, return .fixed(.infinity) to indicate that the corner should be as round as it could be.

## Declaration

```swift
func corners(in size: CGSize?) -> Self.Corners?
```
