每次新位置更新后是否需要重新启动 startMonitoringSignificantLocationChanges?
当我的应用程序进入后台时,我启动 startMonitoringSignificantLocationChanges ,我确保当触发 didUpdateToLocation 时,它将检查缓存的位置和无效的精度读数,然后从该方法返回。但是,如果我确实获得了良好的位置更新,我是否需要通过
[manager stopMonitoringSignificantLocationChanges];
[manager startMonitoringSignificantLocationChanges];
在末尾添加以下内容来重新启动 startMonitoringSignificantLocationChanges? 我希望应用程序在后台时能够持续监控重大变化。
I start startMonitoringSignificantLocationChanges when my app goes into the background, I make sure that when didUpdateToLocation is triggered, it will check for cached location and invalid accuracy readings and then return from the method. But if I do get a good location update, do I need to restart startMonitoringSignificantLocationChanges by adding:
[manager stopMonitoringSignificantLocationChanges];
[manager startMonitoringSignificantLocationChanges];
At the end?
I want the app to keep monitoring for significant changes when it is in the background.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。它会持续更新,直到您调用
stopMonitoringSignificantLocationChanges
。No. It'll will keep updating until you call
stopMonitoringSignificantLocationChanges
.