NSSortDescriptor *sortByPrice = [[NSSortDescriptor alloc] initWithKey:@"price" ascending:NO];
[fetchRequest setSortDescriptors:[NSArray arrayWithObjects:sortByPrice, nil]]
NSFetchRequest排序
最新推荐文章于 2022-03-10 10:16:07 发布
NSSortDescriptor *sortByPrice = [[NSSortDescriptor alloc] initWithKey:@"price" ascending:NO];
[fetchRequest setSortDescriptors:[NSArray arrayWithObjects:sortByPrice, nil]]