Instance Property

undoManager

The document’s undo manager object.

Declaration

@property(strong) NSUndoManager *undoManager;

Discussion

When the hasUndoManager property is YES, accessing this property creates an NSUndoManager before returning it. If the hasUndoManager property is NO, the value of this property is nil by default. Assigning an undo manager to this property stores a reference to the object and automatically changes the hasUndoManager property to YES.

Whether you assign an undo manager or let the document create one, the document registers itself as an observer of various NSUndoManager notifications so that appropriate document actions are stored on the undo stack.

See Also

Working with Undo Manager

hasUndoManager

A Boolean value indicating whether the document owns or should own an undo manager object.

- updateChangeCount:

Updates the receiver’s change count according to the given change type.