<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CALayer/setNeedsDisplay()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CALayer(im)setNeedsDisplay"
  },
  "title" : "setNeedsDisplay()"
}
-->

# setNeedsDisplay()

Marks the layer’s contents as needing to be updated.

```
func setNeedsDisplay()
```

## Discussion

Calling this method causes the layer to recache its content. This results in the layer potentially calling either the [`display(_:)`](/documentation/QuartzCore/CALayerDelegate/display(_:)) or [`draw(_:in:)`](/documentation/QuartzCore/CALayerDelegate/draw(_:in:)) method of its delegate. The existing content in the layer’s [`contents`](/documentation/QuartzCore/CALayer/contents) property is removed to make way for the new content.

---

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)