undo all changes made in the child view controller
问题 There are two entities: Author and Book. Author has an attribute authorName and a to-many relationships books. Book has several attributes and a relationship author. There is a view controller (VCAuthor) to edit an Author object. The child view controller(VCBook) is to edit books of the author. There is only one managedobjectcontext. In the VCBook class i group the undomanager as following -(void)viewDidLoad { NSUndoManager *anUndoManager = [[NSUndoManager alloc] init]; [self.book