CMMagneticField; 4.设备运动信息 CMDeviceMotion类包含了设备的空间状态信息: @interface CMDeviceMotion : CMLogItem //设备的空间状态 CMAttitude...后面会介绍 @property(readonly, nonatomic) CMAttitude *attitude; //设备的 陀螺仪数据 @property(readonly, nonatomic)...CMMagneticFieldCalibrationAccuracyLow, //低 CMMagneticFieldCalibrationAccuracyMedium,//中 CMMagneticFieldCalibrationAccuracyHigh//高 } ; CMAttitude...类中封装的信息如下: @interface CMAttitude : NSObject { //设备翻滚弧度 @property(readonly...@property(readonly, nonatomic) CMQuaternion quaternion; //进行转换 - (void)multiplyByInverseOfAttitude:(CMAttitude
interface CMDeviceMotion : CMLogItem { @private id _internal; } //设备的状态对象 @property(readonly, nonatomic) CMAttitude...CMCalibratedMagneticField magneticField NS_AVAILABLE(NA,5_0); 相比之前两个类,这个就比较复杂了,attitude对象中又封装了许多设备的状态属性: @interface CMAttitude
= nil) { CMAttitude *attitude = deviceMotion.attitude; if (self.referenceAttitude
领取专属 10元无门槛券
手把手带您无忧上云