NSSortDescriptor *sortDescriptor1 = [NSSortDescriptor sortDescriptorWithKey:@"distanceValue" ascending:YES]; NSArray *tempArray = [goodsInfoArray sortedArrayUsingDescriptors:[NSArray arrayWithObjects:sortDescriptor1, nil]];
原文:http://www.cnblogs.com/gcczhongduan/p/4025231.html