我想这取决于在阵列self.contacts使用排序子数组键值对
守则FIRST_NAME用来阵列
-(void)Sort
{
NSSortDescriptor *sdName = [[NSSortDescriptor alloc] initWithKey:@"first_name" ascending:YES];
self.contacts = [NSMutableArray arrayWithArray:[self.contacts sortedArrayUsingDescriptors:[NSArray arrayWithObjects:sdName, nil]]];
}
排序排序我的主阵列的主要的NSArray
迈德特
self.contacts = (
{
contact = {
"first_name" = "Test R";
};
"last_met" = (
{
"last_met_date" = "2014-10-09";
}
);
},
{
contact = {
"first_name" = "Test K";
};
"last_met" = (
{
"last_met_date" = "2014-10-09";
}
);
}
)
请添加更多信息。你的问题非常模糊。 – TMob 2014-10-10 08:55:43