标签:rtu 必须 with ota else int table integer code
NSMutableArray *copyArray =[NSMutableArray arrayWithArray:tempArray];
[copyArray sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
ChannelAnalyseInfo *info1 = (ChannelAnalyseInfo *)obj1;
ChannelAnalyseInfo *info2 = (ChannelAnalyseInfo *)obj2;
NSInteger m1 = info1.totalQuantity;
NSInteger m2 = info2.totalQuantity;
/**
* 必须换成整型,字符串对比会不准
*/
if (m1<m2) {
return NSOrderedAscending;
}else if(m1>m2){
return NSOrderedDescending;
}else{
return NSOrderedSame;
}
}];
标签:rtu 必须 with ota else int table integer code
原文地址:https://www.cnblogs.com/guligei/p/9473841.html