Contents

preservesVersions

A Boolean value that indicates whether the document subclass supports version management.

Declaration

class var preservesVersions: Bool { get }

Return Value

true if the receiving subclass of NSDocument supports Versions; otherwise false.

Discussion

The default implementation of this method returns [self autosavesInPlace]. You can override it and return false to declare that NSDocument should not preserve old document versions.

Returning false from this method disables version browsing and revertToSaved(_:), which rely on version preservation when autosaving in place. Returning true from this method when autosavesInPlace returns false will result in undefined behavior.

See Also

Configuring the Autosave Behavior