---
title: UndoManager.DidCloseUndoGroupMessage
framework: foundation
role: symbol
role_heading: Structure
path: foundation/undomanager/didcloseundogroupmessage
---

# UndoManager.DidCloseUndoGroupMessage

A message that an undo manager sends after closing an undo group.

## Declaration

```swift
struct DidCloseUndoGroupMessage
```

## Overview

Overview The undo manager posts this message after you call endUndoGrouping(). Because this is a “did”-style message, the undo manager sends the message after it closes the undo group. Observe this message with the identifier didCloseUndoGroup, or specify its type directly to the addObserver(of:for:using:) method. The Subject of this message type is UndoManager. This message interoperates with the notification NSUndoManagerDidCloseUndoGroup. The system notifies observers of the message when the NotificationCenter posts the notification. Similarly, the system notifies observers of the notification when it posts the message.

## Topics

### Initializers

- [init(groupIsDiscardable:)](foundation/undomanager/didcloseundogroupmessage/init(groupisdiscardable:).md)

### Instance Properties

- [groupIsDiscardable](foundation/undomanager/didcloseundogroupmessage/groupisdiscardable.md)

## Relationships

### Conforms To

- [NotificationCenter.MainActorMessage](foundation/notificationcenter/mainactormessage.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Working with notification messages

- [UndoManager.WillUndoChangeMessage](foundation/undomanager/willundochangemessage.md)
- [UndoManager.DidUndoChangeMessage](foundation/undomanager/didundochangemessage.md)
- [UndoManager.WillRedoChangeMessage](foundation/undomanager/willredochangemessage.md)
- [UndoManager.DidRedoChangeMessage](foundation/undomanager/didredochangemessage.md)
- [UndoManager.CheckpointMessage](foundation/undomanager/checkpointmessage.md)
- [UndoManager.DidOpenUndoGroupMessage](foundation/undomanager/didopenundogroupmessage.md)
- [UndoManager.WillCloseUndoGroupMessage](foundation/undomanager/willcloseundogroupmessage.md)
