---
title: UICornerConfiguration
framework: uikit
role: symbol
role_heading: Structure
path: uikit/uicornerconfiguration-swift.struct
---

# UICornerConfiguration

A configuration that defines how corner radii are mapped to the corners of a rectangle.

## Declaration

```swift
struct UICornerConfiguration
```

## Overview

Overview Create a UICornerConfiguration that expresses how you want the corners of your view to appear. Your configuration can apply to corners independently or uniformly, and can form the following types of corners: A squared corner A rounded corner A rounded corner that’s concentric relative to the containing view Corners that are rounded to form a capsule Select a method to create a configuration that describes which corners of your view you want to be uniform and which corners you want to be independent, then provide instances of UICornerRadius as parameters to indicate which type you want each corner to be. The system uses squared corners by default, so you don’t need to set a configuration to get squared corners. Configure a rounded corner To configure a rounded corner with a fixed radius, provide fixed(_:) with a value greater than zero for the radius. Since UICornerRadius conforms to ExpressibleByFloatLiteral and ExpressibleByIntegerLiteral, you can also provide a float or integer value for the radius: myView.cornerConfiguration = .corners(radius: 12.0) Configure a concentric rounded corner To configure a rounded corner that’s concentric relative to the containing view, use containerConcentric(minimum:): myView.cornerConfiguration = .corners(radius: .containerConcentric()) Set the minimum parameter to indicate a minimum radius for the rounded corner. Configure a corner as a capsule To configure rounded corners that form a capsule, use capsule(maximumRadius:): myView.cornerConfiguration = .capsule() Set the maximumRadius parameter to allow your view to break the capsule paradigm and stretch vertically with an edge if the radius necessary to form a capsule exceeds what you provide.

## Topics

### Configuring independent corners

- [corners(radius:)](uikit/uicornerconfiguration-swift.struct/corners(radius:).md)
- [corners(topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:)](uikit/uicornerconfiguration-swift.struct/corners(topleftradius:toprightradius:bottomleftradius:bottomrightradius:).md)

### Configuring corners as a capsule

- [capsule(maximumRadius:)](uikit/uicornerconfiguration-swift.struct/capsule(maximumradius:).md)

### Configuring uniform corners

- [uniformCorners(radius:)](uikit/uicornerconfiguration-swift.struct/uniformcorners(radius:).md)
- [uniformEdges(leftRadius:rightRadius:)](uikit/uicornerconfiguration-swift.struct/uniformedges(leftradius:rightradius:).md)
- [uniformEdges(topRadius:bottomRadius:)](uikit/uicornerconfiguration-swift.struct/uniformedges(topradius:bottomradius:).md)
- [uniformBottomRadius(_:topLeftRadius:topRightRadius:)](uikit/uicornerconfiguration-swift.struct/uniformbottomradius(_:topleftradius:toprightradius:).md)
- [uniformLeftRadius(_:topRightRadius:bottomRightRadius:)](uikit/uicornerconfiguration-swift.struct/uniformleftradius(_:toprightradius:bottomrightradius:).md)
- [uniformRightRadius(_:topLeftRadius:bottomLeftRadius:)](uikit/uicornerconfiguration-swift.struct/uniformrightradius(_:topleftradius:bottomleftradius:).md)
- [uniformTopRadius(_:bottomLeftRadius:bottomRightRadius:)](uikit/uicornerconfiguration-swift.struct/uniformtopradius(_:bottomleftradius:bottomrightradius:).md)

## Relationships

### Conforms To

- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### Configuring a view’s corners

- [cornerConfiguration](uikit/uiview/cornerconfiguration-7l0ja.md)
- [UICornerRadius](uikit/uicornerradius-swift.struct.md)
- [effectiveRadius(corner:)](uikit/uiview/effectiveradius(corner:).md)
