我有一个数组,命名为detailTexts
从浮点数中获取他的数据:
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];**
}
我如何对数组进行排序以首先获得几乎位置?(我在 mysql 中知道:SORT BY ...)
Xcode 4.3(更新版本),Mac OS X Lion