When you convert the values ββinto strings, the sorting will be lexicographic, not numeric, which does not match your question. CLLocationDistance defined as a double type according to Apple docs. With this in mind, create an NSArray with NSNumber instances initialized with your CLLocationDistance data (see numberWithDouble ) and use NSArray sorting compared to them.
Read more about NSNumber here .
source share