Created
March 9, 2015 22:34
-
-
Save EdSancha/7472b86551018049a6b0 to your computer and use it in GitHub Desktop.
Revisions
-
Eduardo Diaz Sancha created this gist
Mar 9, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contextChanged:) name:NSManagedObjectContextWillSaveNotification object:nil]; -(void)contextChanged:(NSNotification *)notification { for(NSManagedObject *object in [(NSManagedObjectContext *)notification.object updatedObjects]) { if([object isKindOfClass:[Product class]]) { id value = [object changedValues][@"value"]; if (value){ NSLog(@"%@",object); } } } }