描述器 排序(根据属性)

NSSortDescriptor *classWithSort=[[NSSortDescriptor alloc]initWithKey:@"class" ascending:YES];

        NSSortDescriptor *ageWithSort=[[NSSortDescriptor alloc]initWithKey:@"age" ascending:YES];

        NSArray *dic = [NSArray arrayWithObjects:classWithSort,ageWithSort,nil];

        NSArray *array = [arr sortedArrayUsingDescriptors:dic];

原文地址:https://www.cnblogs.com/hz-1521049517/p/5113834.html