可以在 xcode 中监控的最大区域是 20 个区域,我如何通过仅监控最近的区域来监控超过这个数字?
for (int i = 0; i < [AllRegionsArray count]; i++) {
NSArray *LongLati = [AllRegionsArray objectAtIndex:i];
lutiuid = [LongLati objectAtIndex:0];
Longtuid = [LongLati objectAtIndex:1];
CLLocationCoordinate2D centreLoc = {[lutiuid floatValue], [Longtuid floatValue]};
CLLocationDistance regionRadius = 100.00;
CLRegion *grRegion = [[CLRegion alloc] initCircularRegionWithCenter:centreLoc radius:regionRadius identifier:[NSString stringWithFormat:@"grRegion%i",i]];
[locationManager startMonitoringForRegion:grRegion desiredAccuracy:acc];
}