<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/wantsUpdateLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(py)wantsUpdateLayer"
  },
  "title" : "wantsUpdateLayer"
}
-->

# wantsUpdateLayer

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

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

## Discussion

A view can update its contents using one of two techniques. It can draw those contents using its [`draw(_:)`](/documentation/AppKit/NSView/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 <doc://com.apple.documentation/documentation/Swift/false>, which causes the view to use its [`draw(_:)`](/documentation/AppKit/NSView/draw(_:)) method.

If your view is layer-backed and updates itself by modifying its layer, override this property and change the return value to <doc://com.apple.documentation/documentation/Swift/true>. Modifying the layer is significantly faster than redrawing the layer contents using [`draw(_:)`](/documentation/AppKit/NSView/draw(_:)). If you override this property to be <doc://com.apple.documentation/documentation/Swift/true>, you must also override the [`updateLayer()`](/documentation/AppKit/NSView/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 <doc://com.apple.documentation/documentation/Swift/true> or <doc://com.apple.documentation/documentation/Swift/false> quickly and not perform other tasks.

If the [`canDrawSubviewsIntoLayer`](/documentation/AppKit/NSView/canDrawSubviewsIntoLayer) property is set to <doc://com.apple.documentation/documentation/Swift/true>, the view ignores the value returned by this method. Instead, the view always uses its [`draw(_:)`](/documentation/AppKit/NSView/draw(_:)) method to draw its content.

> Note:
> When using the ``doc://com.apple.appkit/documentation/AppKit/NSView/updateLayer()`` method to update your view, it is recommended that you set the view’s redraw policy to ``doc://com.apple.appkit/documentation/AppKit/NSView/LayerContentsRedrawPolicy-swift.enum/onSetNeedsDisplay``. This policy lets you control when you want to update the layer’s contents.

## See Also

[`-  updateLayer`](/documentation/AppKit/NSView/updateLayer())

Updates the view’s content by modifying its underlying layer.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)