---
title: wantsUpdateLayer
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/wantsupdatelayer
---

# wantsUpdateLayer

A Boolean value indicating which drawing path the view takes when updating its contents.

## Declaration

```swift
var wantsUpdateLayer: Bool { get }
```

## Discussion

Discussion 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 draw(_:) method. 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 updateLayer() 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 true or false quickly and not perform other tasks. If the canDrawSubviewsIntoLayer 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. note: When using the updateLayer() method to update your view, it is recommended that you set the view’s redraw policy to NSView.LayerContentsRedrawPolicy.onSetNeedsDisplay. This policy lets you control when you want to update the layer’s contents.

## See Also

### Related Documentation

- [updateLayer()](appkit/nsview/updatelayer().md)

### Managing the View’s Layer

- [wantsLayer](appkit/nsview/wantslayer.md)
- [layer](appkit/nsview/layer.md)
- [makeBackingLayer()](appkit/nsview/makebackinglayer().md)
- [layerContentsPlacement](appkit/nsview/layercontentsplacement-swift.property.md)
- [NSView.LayerContentsPlacement](appkit/nsview/layercontentsplacement-swift.enum.md)
- [layerContentsRedrawPolicy](appkit/nsview/layercontentsredrawpolicy-swift.property.md)
- [NSView.LayerContentsRedrawPolicy](appkit/nsview/layercontentsredrawpolicy-swift.enum.md)
- [canDrawSubviewsIntoLayer](appkit/nsview/candrawsubviewsintolayer.md)
- [layerUsesCoreImageFilters](appkit/nsview/layerusescoreimagefilters.md)
- [NSViewLayerContentScaleDelegate](appkit/nsviewlayercontentscaledelegate.md)
