1、使用sortedArrayUsingSelector
NSArray *array = @[@“天”,@“地”,@“玄”,@“黃”,nil];
NSArray *array1 = [array sortedArrayUsingSelector:@selector(compare:)];
2.block方式排序
[array sortedArrayUsingComparator:^NSComprisonResult(id object1,id object2){
NSComparisonResult retuslt = [obj1 compare:obj2];
Return retuslt;
];