<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CALayer/cornerRadius",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CALayer(py)cornerRadius"
  },
  "title" : "cornerRadius"
}
-->

# cornerRadius

The radius to use when drawing rounded corners for the layer’s background. Animatable.

```
var cornerRadius: CGFloat { get set }
```

## Discussion

Setting the radius to a value greater than `0.0` causes the layer to begin drawing rounded corners on its background. By default, the corner radius does not apply to the image in the layer’s [`contents`](/documentation/QuartzCore/CALayer/contents) property; it applies only to the background color and border of the layer. However, setting the [`masksToBounds`](/documentation/QuartzCore/CALayer/masksToBounds) property to <doc://com.apple.documentation/documentation/Swift/true> causes the content to be clipped to the rounded corners.

The default value of this property is `0.0`.

---

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)