ios - 如何使用Swift 4扩展位置跟踪时间[重复]

问题描述 投票:0回答:1

这个问题在这里已有答案:

我正在使用swift 4进行IOS位置跟踪。我看到didUpdateLocations方法每秒执行一次

Log of position tracking

如果有办法将时间从1秒增加到n秒,请告诉我。我认为它可以减少应用程序的电池消耗问题。

先感谢您!

ios swift core-location
1个回答
0
投票

这行代码解决了我的问题。它将每隔100米通知LocationManager

locationManager.distanceFilter = 100.0;

谢谢:How to stop multiple times method calling of didUpdateLocations() in ios

© www.soinside.com 2019 - 2024. All rights reserved.