iPhone-CLHeading寻找方向 [英] iPhone - CLHeading to find direction

查看:56
本文介绍了iPhone-CLHeading寻找方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我正在使用CLLocationManager查找iphone指向的方向.我正在使用属性标题".它给了我x,y和z值. 如何从这些值中找到我当前指向的方向(北或南或东或西)?

In my iPhone application, I'm using using CLLocationManager to find the direction in which my iphone is pointing to. I'm using the property "heading". Its giving me x,y and z values. How can I find from these values in which direction (north or south or east or west) I'm currently pointing to?

推荐答案

headingCLHeading对象.就像文档中告诉您的那样,它还具有以度为单位的真航向和磁航向的属性.

heading is a CLHeading object. As one look in the documentation would have told you, it also has properties for the true and magnetic headings in degrees.

这篇关于iPhone-CLHeading寻找方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆