---
title: CALayerDelegate
framework: quartzcore
role: symbol
role_heading: Protocol
path: quartzcore/calayerdelegate
---

# CALayerDelegate

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

## Declaration

```swift
protocol CALayerDelegate : NSObjectProtocol
```

## Overview

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 property of the layer object.

## Topics

### Providing the Layer’s Content

- [display(_:)](quartzcore/calayerdelegate/display(_:).md)
- [draw(_:in:)](quartzcore/calayerdelegate/draw(_:in:).md)
- [layerWillDraw(_:)](quartzcore/calayerdelegate/layerwilldraw(_:).md)

### Laying Out Sublayers

- [layoutSublayers(of:)](quartzcore/calayerdelegate/layoutsublayers(of:).md)

### Providing a Layer’s Actions

- [action(for:forKey:)](quartzcore/calayerdelegate/action(for:forkey:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Layer Basics

- [CALayer](quartzcore/calayer.md)
- [CAConstraint](quartzcore/caconstraint.md)
- [CALayoutManager](quartzcore/calayoutmanager.md)
- [CAConstraintLayoutManager](quartzcore/caconstraintlayoutmanager.md)
- [CAAction](quartzcore/caaction.md)
