---
title: redo()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/undomanager/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.

## Declaration

```swift
func redo()
```

## Discussion

Discussion Raises an internalInconsistencyException if the method is invoked during an undo operation. This method posts an NSUndoManagerCheckpoint and NSUndoManagerWillRedoChange before it performs the redo operation, and it posts the NSUndoManagerDidRedoChange after it performs the redo operation.

## See Also

### Related Documentation

- [registerUndo(withTarget:selector:object:)](foundation/undomanager/registerundo(withtarget:selector:object:).md)

### Performing undo and redo

- [undo()](foundation/undomanager/undo().md)
- [undoNestedGroup()](foundation/undomanager/undonestedgroup().md)
