Sort an NSArray of NSIntegers:
Iterate over items in NSCountedSet:
NSArray *sorted = [arr sortedArrayUsingSelector:@selector(compare:)];
Iterate over items in NSCountedSet:
for(id i in set) { NSLog(@"Item %@, count: %lu", i, (unsigned long)[set countForObject:i]); }
No comments:
Post a Comment