标签:
NSMutableArray *namearray = [NSMutableArray arrayWithObjects:@"I am a picture", @"I am a guy", @"I am a picture", @"ipad", @"iphone", nil];
NSMutableArray *categoryArray = [[NSMutableArray alloc] init];
for (unsigned i = 0; i < [namearray count]; i++){
if ([categoryArray containsObject:[namearray objectAtIndex:i]] == NO){
[categoryArray addObject:[namearray objectAtIndex:i]];
}
}
标签:
原文地址:http://www.cnblogs.com/106dapeng/p/4683341.html