---
title: setNeedsDisplay()
framework: quartzcore
role: symbol
role_heading: Instance Method
path: quartzcore/calayer/setneedsdisplay()
---

# setNeedsDisplay()

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

## Declaration

```swift
func setNeedsDisplay()
```

## Discussion

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

## See Also

### Updating layer display

- [setNeedsDisplay(_:)](quartzcore/calayer/setneedsdisplay(_:).md)
- [needsDisplayOnBoundsChange](quartzcore/calayer/needsdisplayonboundschange.md)
- [displayIfNeeded()](quartzcore/calayer/displayifneeded().md)
- [needsDisplay()](quartzcore/calayer/needsdisplay().md)
- [needsDisplay(forKey:)](quartzcore/calayer/needsdisplay(forkey:).md)
