NSArray *_firstArray = [NSArrayarrayWithObjects:@"ccccc",@"bbbbb",@"ddddd",@"aaaaa",nil];
NSArray *_sortedArray= [_firstArray sortedArrayUsingSelector:@selector(compare:)];
NSLog(@"未排序:%@",_firstArray);
NSLog(@"排行后:%@",_sortedArray);本文共 233 字,大约阅读时间需要 1 分钟。
NSArray *_firstArray = [NSArrayarrayWithObjects:@"ccccc",@"bbbbb",@"ddddd",@"aaaaa",nil];
NSArray *_sortedArray= [_firstArray sortedArrayUsingSelector:@selector(compare:)];
NSLog(@"未排序:%@",_firstArray);
NSLog(@"排行后:%@",_sortedArray);转载地址:http://ibsha.baihongyu.com/