iPhone指南针干扰检测
如何从我的应用程序中判断指南针是否受到干扰并要求用户重新校准?
当存在指南针干扰时,我希望获得与谷歌地图应用程序相同的行为。
谢谢。
How can I tell from my app if the compass has interference and ask the user to re-calibrate it?
I want to get the same behavior as the google maps app has when there are compass interferences.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实现 CLLocationManagerDelegate 方法以返回真值
如果在通知您事件后检测到干扰,这将告诉 LocationManager 执行重新校准。
如果您出于某种原因需要在覆盖自动删除之前关闭覆盖,请调用
Implement the CLLocationManagerDelegate method to return a true value
This will tell the LocationManager to perform recalibration if interference is detected after notifying you of the event.
If you need to dismiss the overlay for some reason before it is removed automatically then call