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

# layerContentsRedrawPolicy

The contents redraw policy for the view’s layer.

```
var layerContentsRedrawPolicy: NSView.LayerContentsRedrawPolicy { get set }
```

## Discussion

The [`layerContentsRedrawPolicy`](/documentation/AppKit/NSView/layerContentsRedrawPolicy-swift.property) and [`layerContentsPlacement`](/documentation/AppKit/NSView/layerContentsPlacement-swift.property) settings can have significant impacts on performance. If you do not need to redraw your view during each frame update cycle, or if you are willing to accept an approximation of the view’s intermediate appearance during potentially brief animations in exchange for an animation performance and smoothness benefit, you can change the value of this property to one of the modes that does not require constant redrawing. When you do so, you must also specify the desired layer content placement for the view. The content placement determines how the backing layer’s existing cached content image will be mapped into the layer as the layer is resized. It is analogous to, and underpinned by, the <doc://com.apple.documentation/documentation/QuartzCore/CALayer/contentsGravity> property of the <doc://com.apple.documentation/documentation/QuartzCore/CALayer> class.

For a view that has no associated layer, or that has been assigned a developer-provided layer (a layer-hosting view) using the [`layer`](/documentation/AppKit/NSView/layer) property, the default contents redraw policy is [`NSView.LayerContentsRedrawPolicy.never`](/documentation/AppKit/NSView/LayerContentsRedrawPolicy-swift.enum/never) and the [`layerContentsPlacement`](/documentation/AppKit/NSView/layerContentsPlacement-swift.property) property is set to [`NSView.LayerContentsPlacement.scaleAxesIndependently`](/documentation/AppKit/NSView/LayerContentsPlacement-swift.enum/scaleAxesIndependently). These policies tell AppKit not to replace the layer’s content and to provide the same content placement as the <doc://com.apple.documentation/documentation/QuartzCore/CALayerContentsGravity/resize> option.For a layer-backed view—that is, a view for which AppKit created the layer—AppKit sets the contents redraw policy to [`NSView.LayerContentsRedrawPolicy.duringViewResize`](/documentation/AppKit/NSView/LayerContentsRedrawPolicy-swift.enum/duringViewResize) by default. This policy forces the view’s content to be continually redrawn into the view’s backing layer during animated resizing of the view, which produces correct but not optimal performance results.

---

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)