<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/UndoManager/DidUndoChangeMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So13NSUndoManagerC10FoundationE20DidUndoChangeMessageV"
  },
  "title" : "UndoManager.DidUndoChangeMessage"
}
-->

# UndoManager.DidUndoChangeMessage

A message that an undo manager sends after undoing a change.

```
struct DidUndoChangeMessage
```

## Overview

The undo manager posts this message after you call [`undo()`](/documentation/Foundation/UndoManager/undo()) or [`undoNestedGroup()`](/documentation/Foundation/UndoManager/undoNestedGroup()).
Because this is a “did”-style message, the undo manager sends the message after it performs the undo.

Observe this message type with the identifier [`didUndoChange`](/documentation/Foundation/NotificationCenter/MessageIdentifier/didUndoChange), or specify its type directly to the `addObserver(of:for:using:)` method.
The [`Subject`](/documentation/Foundation/NotificationCenter/MainActorMessage/Subject) of this message type is [`UndoManager`](/documentation/Foundation/UndoManager).

This message interoperates with the notification [`NSUndoManagerDidUndoChange`](/documentation/Foundation/NSNotification/Name-swift.struct/NSUndoManagerDidUndoChange).
The system notifies observers of the message when the [`NotificationCenter`](/documentation/Foundation/NotificationCenter) posts the notification.
Similarly, the system notifies observers of the notification when it posts the message.

## Topics

### Initializers

[`init(groupIsDiscardable: Bool)`](/documentation/Foundation/UndoManager/DidUndoChangeMessage/init(groupIsDiscardable:))

Creates a did undo change message.

### Instance Properties

[`var groupIsDiscardable: Bool`](/documentation/Foundation/UndoManager/DidUndoChangeMessage/groupIsDiscardable)

A Boolean value that indicates whether the undo group as a whole is discardable.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`MainActorMessage`](/documentation/Foundation/NotificationCenter/MainActorMessage)

---

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)