IOS ( Object-C )
[IOS / Object-C] - NSMutableArray 중복값 제거
Vivara
2015. 1. 28. 19:04
반응형
NSMutableArray *_userIds = [NSMutableArray new];
for( NSInteger i = 0; i < 3; i++ ) {
[_userIds insertObject:@"aaaaaaaaaa" atIndex:i];
}
NSOrderedSet *userSet = [[NSOrderedSet alloc] initWithArray:_userIds];
_userIds = [[NSMutableArray alloc] initWithArray:[userSet array]];
반응형