<!--
{
  "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/redo()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUndoManager(im)redo"
  },
  "title" : "redo()"
}
-->

# redo()

Performs the operations in the last group on the redo stack, if there are any, recording them on the undo stack as a single group.

```
func redo()
```

## Discussion

Raises an [`internalInconsistencyException`](/documentation/Foundation/NSExceptionName/internalInconsistencyException) if the method is invoked during an undo operation.

This method posts an [`NSUndoManagerCheckpoint`](/documentation/Foundation/NSNotification/Name-swift.struct/NSUndoManagerCheckpoint) and [`NSUndoManagerWillRedoChange`](/documentation/Foundation/NSNotification/Name-swift.struct/NSUndoManagerWillRedoChange) before it performs the redo operation, and it posts the [`NSUndoManagerDidRedoChange`](/documentation/Foundation/NSNotification/Name-swift.struct/NSUndoManagerDidRedoChange) after it performs the redo operation.

## See Also

[`-  registerUndoWithTarget:selector:object:`](/documentation/Foundation/UndoManager/registerUndo(withTarget:selector:object:))

Registers the selector of the specified target to implement a single undo operation that the target receives.



---

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)