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


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.


Providing the Layer's Content

func display(CALayer)

Tells the delegate to implement the display process.

func draw(CALayer, in: CGContext)

Tells the delegate to implement the display process using the layer's CGContext.

func layerWillDraw(CALayer)

Notifies the delegate of an imminent draw.

Laying Out Sublayers

func layoutSublayers(of: CALayer)

Tells the delegate a layer's bounds have changed.

Providing a Layer's Actions

func action(for: CALayer, forKey: String)

Returns the default action of the action(forKey:) method.


Inherits From

Adopted By