Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含很多不同数据的 json 数据库。我将这些数据保存在一个数组中,现在我想按字母顺序对其进行排序。有人可以帮我怎么做吗?
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"Attribute Name" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors];