打算实现tableview的生序降序排序
```js
NSArray * rs= [oneArray sortedArrayUsingComparator:NSComparisonResult(RFIConModel * obj1, RFIConModel * obj2) {
NSComparisonResult result=NSOrderedSame ;
float obj1float=[obj1.imageWidth floatValue];
float obj2float=[obj2.imageWidth floatValue];
if (obj1float>obj2float) {
result=NSOrderedAscending;
} else if (obj1float==obj2float) {
result= NSOrderedSame;
} else {
result= NSOrderedDescending;
}
if (flag) {
return result;
}
else
{
return [RFIConModel comResultRevert:result];
}
return result;
```
时间: 2024-10-12 00:40:39