Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的意思是我希望这种情况发生:
1 - 监控退出区域 2 - 当区域触发时,我想知道 ex:退出该区域的用户是向北还是向南并基于该触发特定通知...
是的,您可以使用CLLocationManager.
CLLocationManager
if CLLocationManager.headingAvailable() { manager.headingFilter = 5 manager.startUpdatingHeading() }
然后CLLocationManager的代表将通过以下方式提供标题更新:
func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading)