Tells the delegate to implement the display process.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- Core Animation
The layer whose contents need updating.
display(_:) delegate method is called when the layer is marked for its content to be reloaded, typically initiated by the
set method. The typical technique for updating is to set the layer's
Listing 1 shows how you can create a class named
Layer that implements
CALayer and sets it as a layer's (named
sublayer) delegate. When
set is called on
sublayer, the delegate's
display(_:) replaces its contents with a specified image.