iPod Touch 4g 上的磁航向
[CLLocationManager headerAvailable] 在我的 iPod Touch 4 上返回“否”,但我的设备上有一个应用程序可以在位置服务关闭的情况下确定磁航向。
还有其他方法获取标题吗?
[CLLocationManager headingAvailable] returns NO on my iPod Touch 4, but I have an app on the device that determines magnetic heading with location services turned off.
Is there any other way to get the heading?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
成立! CoreMotion 就是答案。
iPod 4 上的航向无法通过 CLLocationManager 获得,但我们仍然可以使用 CoreMotion 框架读取磁力计数据
Found! CoreMotion is the answer.
Heading on iPod 4 is not available through CLLocationManager, but we still can read magnetometer data using CoreMotion framework