I have this code:
Store* store = [NSEntityDescription insertNewObjectForEntityForName:@\"Store\"];
store.name = @\"My Company\"
...
Now the sto
Core Data has built-in support for undo, so you can undo individual changes by sending the -undo
message to the context:
[store.managedObjectContext undo];
It also supports -redo
. You can undo all changes up to the most recent save using the -rollback
method:
[store.managedObjectContext rollback]
as indicated in @melsam's answer.