I have an NSManagedObject with attributes that a user can edit with a view. The view is populated with the values from the object, the user can edit the values, and the values are written back to the object. I want the user to explicitly tap a save or cancel button to commit or undo the changes.
The problem is that the view is in a UITabbarController where other things are going on. The user might perform operations in another tab where [NSManagedObjectContext save] or [NSManagedObjectContext undo] might get called. This would affect the NSManagedObject (from the first mentioned tab) before the user decides if they want to save or cancel it.
Is there a way around this? Can we temporarily disable persistence on an NSManagedObject until the user taps the button?