Contents

preservesContentDuringLiveResize

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

Declaration

var preservesContentDuringLiveResize: Bool { get }

Discussion

The default value of this property is false. If your view supports content preservation, override this property and return 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(_:) 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.

See Also

Related Documentation

Managing Live Resize