NSSortDescriptor *frequencyDescriptor = [NSSortDescriptor sortDescriptorWithKey:@""
ascending:NO
comparator:^(id obj1, id obj2) {
return [obj1 compare:obj2 options:NSNumericSearch];
}];
NSEnumerator * enumerator = [arr_distance objectEnumerator];
NSArray * descriptors = [NSArray arrayWithObjects:frequencyDescriptor, nil];
NSArray * sortedArray = [arr_distance sortedArrayUsingDescriptors:descriptors];
enumerator = [sortedArray objectEnumerator];
NSLog(@"sortedArray = %@",sortedArray);
0 Comment(s)