Created
October 30, 2014 05:25
-
-
Save chinmaygarde/34c315da14b4cc6e6097 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
NSMutableSet *aSet = [[NSMutableSet alloc] init]; | |
// add NSDictionary objects to aSet | |
NSDictionary *aDictionary = @{@(1) : @"1"}; | |
[aSet addObject:aDictionary]; | |
// Now test for membership | |
if ([aSet containsObject:aDictionary]) { | |
NSLog(@"set contains object"); | |
} | |
else { | |
NSLog(@"set does NOT contain object"); | |
} | |
NSMutableSet *newSet = [NSMutableSet setWithSet:aSet]; | |
if ([newSet containsObject:aDictionary]) { | |
NSLog(@"newSet contains object"); | |
} | |
else { | |
NSLog(@"newSet does NOT contain object"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment