layerWillDraw(_:)
Notifies the delegate of an imminent draw.
Declaration
optional func layerWillDraw(_ layer: CALayer)Parameters
- layer:
The layer whose contents will be drawn.
Discussion
The layerWillDraw(_:) method is called before draw(_:in:). You can use this method to configure any layer state affecting contents prior to draw(_:in:) such as contentsFormat and isOpaque.