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
NO, 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
YES. Modifying the layer is significantly faster than redrawing the layer contents using
draw. If you override this property to be
YES, 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
NO quickly and not perform other tasks.
can property is set to
YES, the view ignores the value returned by this method. Instead, the view always uses its
draw method to draw its content.