NSArray中存的是实体时的排序

NSArray中存储的是实体时的排序

by 伍雪颖

NSSortDescriptor *sortDescriptor1 = [NSSortDescriptor sortDescriptorWithKey:@"distanceValue" ascending:YES];
NSArray *tempArray = [goodsInfoArray sortedArrayUsingDescriptors:[NSArray arrayWithObjects:sortDescriptor1, nil]];


原文地址:https://www.cnblogs.com/gcczhongduan/p/4025231.html