来自CLLocationManager.h:
/*
* startMonitoringForRegion:
*
* Discussion:
* Start monitoring the specified region.
*
* If a region of the same type with the same identifier is already being monitored for this application,
* it will be removed from monitoring. For circular regions, the region monitoring service will prioritize
* regions by their size, favoring smaller regions over larger regions.
*
* This is done asynchronously and may not be immediately reflected in monitoredRegions.
*/
- (void)startMonitoringForRegion:(CLRegion *)region __OSX_AVAILABLE_STARTING(__MAC_TBD,__IPHONE_5_0);
有没有一种好方法可以知道这个异步调用何时完成?一旦我知道某个地区的区域监控已启动,我就会尝试执行其他操作,但看起来这可能需要从> 1s到> 20s。
答案 0 :(得分:3)
当然是的。在CLLocationManagerDelegate
,您会找到- locationManager:didStartMonitoringForRegion:
。 here您将找到完整的代表说明。