【发布时间】:2017-11-27 22:34:17
【问题描述】:
我的意思是我希望这种情况发生:
1 - 监控退出区域 2 - 当区域触发时,我想知道 ex:退出该区域的用户是向北还是向南并基于该触发特定通知...
【问题讨论】:
标签: ios swift location cllocation clregion
我的意思是我希望这种情况发生:
1 - 监控退出区域 2 - 当区域触发时,我想知道 ex:退出该区域的用户是向北还是向南并基于该触发特定通知...
【问题讨论】:
标签: ios swift location cllocation clregion
是的,您可以使用 CLLocationManager 开始监控航向更新。
if CLLocationManager.headingAvailable() {
manager.headingFilter = 5
manager.startUpdatingHeading()
}
然后CLLocationManager 的代表将通过以下方式提供标题更新:
func locationManager(_ manager: CLLocationManager,
didUpdateHeading newHeading: CLHeading)
【讨论】: