I'm trying to sort a list of CLLocationDistance
values by closest distance (ascending order). I first converted the values to NSString
objects so that I could use the following sort:
NSArray *sortedArray;
sortedArray = [distances sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSString cannot sort on the numeric value.
How can I set a list of numeric values in ascending order?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…