//如果想set排序以后再取,可以这样:
NSSet *users = [groupUser users];
NSSortDescriptor *sd = [[NSSortDescriptor alloc] initWithKey:@"displayName" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObjects:sd, nil];
NSArray *userArray = [users sortedArrayUsingDescriptors:sortDescriptors];
//如果直接取,可以这样:
NSSet *users = [groupUser users];
NSSortDescriptor *sd = [[NSSortDescriptor alloc] initWithKey:@"displayName" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObjects:sd, nil];
NSArray *userArray = [users sortedArrayUsingDescriptors:sortDescriptors];
//如果直接取,可以这样:
NSArray *userArray = [users allObjects];