简体   繁体   English

在iPhone中暂停和恢复CLLocation跟踪

[英]Pause and Resume CLLocation tracking in iphone

How to pause and resume the location tracking? 如何暂停和恢复位置跟踪? I have developed code for location tracking, but i want it to pause and not stop, and then resume, so that my distance calculation continues. 我已经开发了用于位置跟踪的代码,但是我希望它暂停而不停止,然后继续,以便继续进行距离计算。 (Pause and resume is activated by UIButtons) (暂停和恢复由UIButtons激活)

If you are talking about CLLocationManager, no, you can't pause it. 如果您在谈论CLLocationManager,否,您不能暂停它。 You can, however, set a large distance filter. 但是,您可以设置大距离滤镜。 According to WWDC 2010 video for core location, this will reduce the resources being consumed by the location services. 根据WWDC 2010核心定位视频,这将减少定位服务消耗的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM