How does one create a NSSet of objects from an array based on a property.
NSSet
e.g. Array of objects, each with a strong reference to a type pro
type
NSMutableSet* classes = [[NSMutableSet alloc] init]; NSMutableSet* actualSet = [[NSMutableSet alloc] init]; for(id object in array) { if([classes containsObject:[object class]] == NO) { [classes addObject:[object class]]; [actualSet addObject:object]; } }