I am using the NSManagedObjectContextObjectsDidChangeNotification notfication in my app, I already now how to use it. As I have used the below code to add the observer …
- (void) awakeFromNib {
NSNotificationCenter *nc;
nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self
selector:@selector(syncKVO:)
name:NSManagedObjectContextObjectsDidChangeNotification
object:nil];
}
- (void)syncKVO:(id)sender {
NSNotificationCenter *nc;
nc = [NSNotificationCenter defaultCenter];
[nc removeObserver:self
name:NSManagedObjectContextObjectsDidChangeNotification
object:nil];
// Do stuff.
[nc addObserver:self
selector:@selector(syncKVO:)
name:NSManagedObjectContextObjectsDidChangeNotification
object:nil];
}
But I would like to check the userInfo dictionary to make sure the method actually has to be triggered, How would I do this?