<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/UndoManager/disableUndoRegistration()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUndoManager(im)disableUndoRegistration"
  },
  "title" : "disableUndoRegistration()"
}
-->

# disableUndoRegistration()

Disables the recording of undo operations.

```
func disableUndoRegistration()
```

## Discussion

This method disables undos recorded by [`registerUndo(withTarget:selector:object:)`](/documentation/Foundation/UndoManager/registerUndo(withTarget:selector:object:)) or invocation-based undo.

This method can be invoked multiple times by multiple clients. The [`enableUndoRegistration()`](/documentation/Foundation/UndoManager/enableUndoRegistration()) method must be invoked an equal number of times to re-enable undo registration.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)