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

# preservesContentDuringLiveResize

A Boolean value indicating whether the view optimizes live-resize operations by preserving content that has not moved.

```
var preservesContentDuringLiveResize: Bool { get }
```

## Discussion

The default value of this property is <doc://com.apple.documentation/documentation/Swift/false>. If your view supports content preservation, override this property and return <doc://com.apple.documentation/documentation/Swift/true>. Content preservation lets your view decide what to redraw during a live resize operation. If your view supports this feature, you should also provide a custom implementation of the [`setFrameSize(_:)`](/documentation/AppKit/NSView/setFrameSize(_:)) method that invalidates the portions of your view that actually need to be redrawn.

For information on how to implement this feature in your views, see [Cocoa Performance Guidelines](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaPerformance/CocoaPerformance.html#//apple_ref/doc/uid/TP40001448).

## See Also

[`setFrameSize(_:)`](/documentation/AppKit/NSView/setFrameSize(_:))

Sets the size of the view’s frame rectangle to the specified dimensions, resizing it within its superview without affecting its coordinate system.



---

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)