Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created March 12, 2011 14:44
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/867285 to your computer and use it in GitHub Desktop.
Save mikeabdullah/867285 to your computer and use it in GitHub Desktop.
More general way to disable undo registration, which happens to be compatible with NSManagedObjectContext
[[NSNotificationCenter defaultCenter]
postNotificationName:NSUndoManagerCheckpointNotification
object:undoManager];
[undoManager disableUndoRegistration];
// Make your special changes to the managed object
[[NSNotificationCenter defaultCenter]
postNotificationName:NSUndoManagerCheckpointNotification
object:undoManager];
[undoManager enableUndoRegistration];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment