i have an array that named detailTexts that having his data from floats:
CLLocation *location = [[CLLocation alloc] initWithLatitude:dlog longitude:dlig];
**CLLocationDistance meters = [userLocation distanceFromLocation:location];**
**float detailFloat = meters * 1000;**
if (meters < 10000) {
NSLog(@"%@", detailText);
[tableData addObject:name];
**detailText = [NSString stringWithFormat:@"%f", detailFloat];**
**[detailTexts addObject:detailText];**
}
how i can sort the array to get nearly location first? (i know it in mysql: SORT BY …)
Xcode 4.3 (updated version), Mac OS X Lion
1 Answer