---
title: enableUndoRegistration()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/undomanager/enableundoregistration()
---

# enableUndoRegistration()

Enables the recording of undo operations.

## Declaration

```swift
func enableUndoRegistration()
```

## Discussion

Discussion Because undo registration is enabled by default, it is often used to balance a prior disableUndoRegistration() message. Undo registration isn’t actually re-enabled until an enable message balances the last disable message in effect. Raises an NSInternalInconsistencyException if invoked while no disableUndoRegistration() message is in effect.

## See Also

### Enabling and disabling undo

- [disableUndoRegistration()](foundation/undomanager/disableundoregistration().md)
- [isUndoRegistrationEnabled](foundation/undomanager/isundoregistrationenabled.md)
