描述器 排序(根据属性)

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];

posted @ 2016-01-08 17:00  5个半柠檬C  阅读(118)  评论(0编辑  收藏  举报