---
title: hasUndoManager
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsdocument/hasundomanager
---

# hasUndoManager

A Boolean value that indicates whether the document owns an undo manager object.

## Declaration

```swift
var hasUndoManager: Bool { get set }
```

## Discussion

Discussion If you change the value of this property to NO and the document already owns an UndoManager object, the document removes the undo manager as an observer of undo-related notifications and then removes its reference to the object.

## See Also

### Managing Undo and Redo Actions

- [undoManager](appkit/nsdocument/undomanager.md)
