Created
November 2, 2009 14:23
-
-
Save SquaredTiki/224185 to your computer and use it in GitHub Desktop.
This file contains 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 characters
- (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