我已经成功地按我的排序键对数据进行了排序lastName
,但我想知道如何排序lastName
,然后按firstName
。这是我用来排序的代码lastName
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"firstName" ascending:YES];
[request setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
如何添加的辅助排序键firstName
?