NSArray *[email protected][@"小雨",@"安安",@"小风",@"荣荣",@"张涛",@"李文荣"];
NSComparator sortblock1=^(id obj1,id obj2){
return [obj1 localizedCompare:obj2];
};
NSArray *sortarray1=[arr2 sortedArrayUsingComparator:sortblock1];
for(id str in sortarray1){
NSLog(@"%@",str);
}
时间: 2024-10-27 18:38:10