Created
March 12, 2011 14:44
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[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