【发布时间】:2014-02-05 12:55:11
【问题描述】:
我必须根据配置对数组进行排序,假设它有一些学生的数据,其中有学生的名字
[NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"abc",@"name", nil],[NSDictionary dictionaryWithObjectsAndKeys:@"efg",@"name", nil][NSDictionary dictionaryWithObjectsAndKeys:@"cde",@"name", nil], nil];
我有另一个数组,它说如何排序这个数组,就像它首先说的应该是 efg 然后 abc 等等。
是否可以使用 nsssortdescriptor 或者我必须编写自定义代码。
【问题讨论】:
标签: ios objective-c nsarray nssortdescriptor