Posts

Showing posts from December, 2013

NSUndoManager with Core Data Objects

I am very new to using NSUndoManager , that too with core data objects. I found not too difficult, but it works in a different way when compared to the way i thought before. Here's my Imagination about NSUndoManager before using it: Once an object for " NSUndoManager " is created and assigned to any "NSManagedObjectContext"(MOC), just calling the "undo" method of " NSUndoManager " would undo all the changes made in the MOC. My imagination about " NSUndoManager " is dead simple right ? Of course, i know there are several features that we'll be missing if it works in that way, like you cant undo a specific operation and redo the same way. After learning step by step, got to know that these are all the few simple steps to use the " NSUndoManager " : (i) Create an instance for " NSUndoManager ", like this or as you wish with "alloc/init" and set that object to your MOC object :