<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CALayerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(pl)CALayerDelegate"
  },
  "title" : "CALayerDelegate"
}
-->

# CALayerDelegate

Methods your app can implement to respond to layer-related events.

```
protocol CALayerDelegate : NSObjectProtocol
```

## Overview

You can implement the methods of this protocol to provide the layer’s content, handle the layout of sublayers, and provide custom animation actions to perform. The object that implements this protocol must be assigned to the [`delegate`](/documentation/QuartzCore/CALayer/delegate) property of the layer object.

## Topics

### Providing the Layer’s Content

[`display(_:)`](/documentation/QuartzCore/CALayerDelegate/display(_:))

Tells the delegate to implement the display process.

[`draw(_:in:)`](/documentation/QuartzCore/CALayerDelegate/draw(_:in:))

Tells the delegate to implement the display process using the layer’s context.

[`layerWillDraw(_:)`](/documentation/QuartzCore/CALayerDelegate/layerWillDraw(_:))

Notifies the delegate of an imminent draw.

### Laying Out Sublayers

[`layoutSublayers(of:)`](/documentation/QuartzCore/CALayerDelegate/layoutSublayers(of:))

Tells the delegate a layer’s bounds have changed.

### Providing a Layer’s Actions

[`action(for:forKey:)`](/documentation/QuartzCore/CALayerDelegate/action(for:forKey:))

Returns the default action of the [`action(forKey:)`](/documentation/QuartzCore/CALayer/action(forKey:)) method.



---

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)