CLHeading:包含CLLocationManager对象所产生的导航数据。
通常情况下,你不必创造这个类的实例,也不需要继承它。在CLLocationManager对象的startUpdatingHeading方法开始后,从委托方法中获取。
此类有7个属性、1个实例方法、1个常量
属性:
headingAccuracy:磁力计可以测量地球散发的磁场,进而确定设备的准确方向。
@property(readonly, nonatomic) CLLocationDirection headingAccuracy
magneticHeading:包含主方向数据,且该数据一直存在。这个属性给出了相对于磁北极的方向数据,磁北极和北极不在同一个位置上。如果您希望得到相对于北极(也称 为地理北极)的方向数据,则必须在startUpdatingHeading之前调用startUpdatingLocation方法来启动位置更新,然通过对象的属性 取得相对于地理北极的方向。
@property(readonly, nonatomic) CLLocationDirection magneticHeading
timestamp:只读记录时间戳。由于Core Location使用几个不同的技术来取得固定位置,位置请求返回的顺序有时可能和时间戳指示的顺序不同。
@property(readonly, nonatomic) NSDate *timestamp
trueHeading:获取相对于北极(也称为地理北极)的方向数据。如果您希望得到相对于北极(也称为地理北极)的方向数据,则必须在startUpdatingHeading
之前 调用startUpdatingLocation
方法来启动位置更新,然通过CLHeading
对象的trueHeading
属性取得相对于地理北极的方向。
@property(readonly, nonatomic) CLLocationDirection trueHeading
x:只读的x轴的地磁数据(单位为microteslas)。
@property(readonly, nonatomic) CLHeadingComponentValue x