A Boolean value indicating which drawing path the view takes when updating its contents.
- macOS 10.8+
A view can update its contents using one of two techniques. It can draw those contents using its
draw(_:) method or it can modify its underlying layer object directly. During the view update cycle, each dirty view calls this method on itself to determine which technique to use. The default implementation of this method returns
false, which causes the view to use its
If your view is layer-backed and updates itself by modifying its layer, override this property and change the return value to
true. Modifying the layer is significantly faster than redrawing the layer contents using
draw(_:). If you override this property to be
true, you must also override the
update method of your view and use it to make the changes to your layer. Do not modify your layer in your implementation of this property. Your implementation should return
false quickly and not perform other tasks.
can property is set to
true, the view ignores the value returned by this method. Instead, the view always uses its
draw(_:) method to draw its content.