gpt4 book ai didi

ios - 有什么好方法可以知道 CLLocationManager 的 startMonitoringForRegion 何时完成?

转载 作者:行者123 更新时间:2023-12-01 18:52:50 25 4
gpt4 key购买 nike

从 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 之间的任何时间。

最佳答案

当然是的。在 CLLocationManagerDelegate你会发现- locationManager:didStartMonitoringForRegion: . here您将找到完整的代表说明。

关于ios - 有什么好方法可以知道 CLLocationManager 的 startMonitoringForRegion 何时完成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29850662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com