---
title: undo()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsmanagedobjectcontext/undo()
---

# undo()

Sends an undo message to the context’s undo manager, asking it to reverse the latest uncommitted changes applied to objects in the object graph.

## Declaration

```swift
func undo()
```

## See Also

### Related Documentation

- [processPendingChanges()](coredata/nsmanagedobjectcontext/processpendingchanges().md)

### Undoing changes

- [undoManager](coredata/nsmanagedobjectcontext/undomanager.md)
- [redo()](coredata/nsmanagedobjectcontext/redo().md)
- [reset()](coredata/nsmanagedobjectcontext/reset().md)
- [rollback()](coredata/nsmanagedobjectcontext/rollback().md)
