Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created March 12, 2011 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/867284 to your computer and use it in GitHub Desktop.
Save mikeabdullah/867284 to your computer and use it in GitHub Desktop.
Apple's recommended way to disable undo registration for NSManagedObjectContext
[[self managedObjectContext] processPendingChanges];
[[[self managedObjectContext] undoManager] disableUndoRegistration];
// Make your special changes to the managed object
[[self managedObjectContext] processPendingChanges];
[[[self managedObjectContext] undoManager] enableUndoRegistration];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment