0
我得在一个NSArray几家餐馆的名单,我想复制是最接近我的位置到一个NSMutableArray,责令的那些......我有下面的代码秩序的NSMutableArray通过计算距离
@property(strong, nonatomic) NSArray *restaurants;
@property(strong, nonatomic) NSMutableArray *orderedRestaurants;
-(void) orderRestaurants{
for(RestaurantBranch *restaurant in _restaurants){
if([self getDistance:restaurant]<10){
[_orderedRestaurants addObject:restaurant];
}
}
}
,但我无法找到一个有效的方法所计算的距离订购的NSMutableArray