Skip to content

Instantly share code, notes, and snippets.

@SquaredTiki
Created November 2, 2009 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SquaredTiki/224185 to your computer and use it in GitHub Desktop.
Save SquaredTiki/224185 to your computer and use it in GitHub Desktop.
- (void)syncKVO:(NSNotification *)notification {
NSDictionary *userInfoDictionary = [notification userInfo];
NSSet *deletedObjects = [userInfoDictionary objectForKey:NSDeletedObjectsKey];
NSSet *changedObjects = [userInfoDictionary objectForKey:NSUpdatedObjectsKey];
if ([deletedObjects count]) {
//do something if it contains objects
} else {
if ([changedObjects count]) {
//do something if it contains objects
} else {
//do something if it doesn't contain objects.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment