728x90
중복 제거
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]];
728x90
'iOS > Objective-C' 카테고리의 다른 글
| NSDictionary (0) | 2022.11.04 |
|---|---|
| NSArray (0) | 2022.11.02 |
| NSString (0) | 2022.10.27 |
| UIButton (0) | 2022.09.28 |
| NotificationCenter(Observer) (0) | 2022.06.10 |
댓글