1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| @interface CMMotionManager : NSObject { @private id _internal; } //设置加速度传感器更新帧率 @property(assign, nonatomic) NSTimeInterval accelerometerUpdateInterval __TVOS_PROHIBITED; //加速度传感器是否可用 @property(readonly, nonatomic, getter=isAccelerometerAvailable) BOOL accelerometerAvailable __TVOS_PROHIBITED; //加速度传感器是否激活 @property(readonly, nonatomic, getter=isAccelerometerActive) BOOL accelerometerActive __TVOS_PROHIBITED; //加速度传感器数据对象 @property(readonly, nullable) CMAccelerometerData *accelerometerData __TVOS_PROHIBITED; //pull方式开始更新加速度数据 - (void)startAccelerometerUpdates __TVOS_PROHIBITED; //push方式更新加速度数据 - (void)startAccelerometerUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMAccelerometerHandler)handler __TVOS_PROHIBITED; //停止更新加速度数据 - (void)stopAccelerometerUpdates __TVOS_PROHIBITED; //螺旋仪传感器刷新帧率 @property(assign, nonatomic) NSTimeInterval gyroUpdateInterval __TVOS_PROHIBITED; //螺旋仪是否可用 @property(readonly, nonatomic, getter=isGyroAvailable) BOOL gyroAvailable __TVOS_PROHIBITED; //螺旋仪是否激活 @property(readonly, nonatomic, getter=isGyroActive) BOOL gyroActive __TVOS_PROHIBITED; //螺旋仪数据 @property(readonly, nullable) CMGyroData *gyroData __TVOS_PROHIBITED; //pull方式开始更新螺旋仪 - (void)startGyroUpdates __TVOS_PROHIBITED; //push方式开始更新螺旋仪 - (void)startGyroUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMGyroHandler)handler __TVOS_PROHIBITED; //停止更新螺旋仪 - (void)stopGyroUpdates __TVOS_PROHIBITED; //磁力传感更新帧率 @property(assign, nonatomic) NSTimeInterval magnetometerUpdateInterval NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //设备磁力传感器是否可用 @property(readonly, nonatomic, getter=isMagnetometerAvailable) BOOL magnetometerAvailable NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //设备磁力传感器是否激活 @property(readonly, nonatomic, getter=isMagnetometerActive) BOOL magnetometerActive NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //设备磁力状态数据 @property(readonly, nullable) CMMagnetometerData *magnetometerData NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //pull方式更新设备磁力状态 - (void)startMagnetometerUpdates NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //push方式更新设备磁力状态 - (void)startMagnetometerUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMMagnetometerHandler)handler NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //停止更新设备状态 - (void)stopMagnetometerUpdates NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //设备状态更新帧率 @property(assign, nonatomic) NSTimeInterval deviceMotionUpdateInterval __TVOS_PROHIBITED; //参考器枚举 + (CMAttitudeReferenceFrame)availableAttitudeReferenceFrames NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; @property(readonly, nonatomic) CMAttitudeReferenceFrame attitudeReferenceFrame NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //设备运动信息是否可用 @property(readonly, nonatomic, getter=isDeviceMotionAvailable) BOOL deviceMotionAvailable __TVOS_PROHIBITED; //设备运动信息是否激活 @property(readonly, nonatomic, getter=isDeviceMotionActive) BOOL deviceMotionActive __TVOS_PROHIBITED; //设备运动信息对象 @property(readonly, nullable) CMDeviceMotion *deviceMotion __TVOS_PROHIBITED; //pull方式开始刷新运动信息 - (void)startDeviceMotionUpdates __TVOS_PROHIBITED; //push方式开始刷新运动信息 - (void)startDeviceMotionUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMDeviceMotionHandler)handler __TVOS_PROHIBITED; //使用某个参考系 - (void)startDeviceMotionUpdatesUsingReferenceFrame:(CMAttitudeReferenceFrame)referenceFrame NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //push方式开始刷新设备运动信息 - (void)startDeviceMotionUpdatesUsingReferenceFrame:(CMAttitudeReferenceFrame)referenceFrame toQueue:(NSOperationQueue *)queue withHandler:(CMDeviceMotionHandler)handler NS_AVAILABLE(NA,5_0) __TVOS_PROHIBITED; //停止刷新设备运动信息 - (void)stopDeviceMotionUpdates __TVOS_PROHIBITED;
|