<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/layer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(py)layer"
  },
  "title" : "layer"
}
-->

# layer

The view’s Core Animation layer to use for rendering.

```
var layer: CALayer { get }
```

## Discussion

This property is never `nil`. The value of the [`layerClass`](/documentation/UIKit/UIView/layerClass) property determines the actual class of the layer object. The view is the layer’s delegate.

> Warning:
> Because the view is the layer’s delegate, never make the view the delegate of another <doc://com.apple.documentation/documentation/QuartzCore/CALayer> object. Additionally, never change the delegate of this layer object.

---

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)