NSArray *sortArr=[arr sortedArrayUsingSelector:@selector(compareWithClassAndName:)];
//数组排序--block
NSComparator sortBlock=^(id obj1,idobj2){
return [obj1 compare:obj2];
};
NSArray *sortArray=[arr sortedArrayUsingComparator:sortBlock];
for (id str in sortArray) {
NSLog(@"%@",str);
}