---
title: disableUndoRegistration()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/undomanager/disableundoregistration()
---

# disableUndoRegistration()

Disables the recording of undo operations.

## Declaration

```swift
func disableUndoRegistration()
```

## Discussion

Discussion This method disables undos recorded by registerUndo(withTarget:selector:object:) or invocation-based undo. This method can be invoked multiple times by multiple clients. The enableUndoRegistration() method must be invoked an equal number of times to re-enable undo registration.

## See Also

### Enabling and disabling undo

- [enableUndoRegistration()](foundation/undomanager/enableundoregistration().md)
- [isUndoRegistrationEnabled](foundation/undomanager/isundoregistrationenabled.md)
