CoreMotion的实际使用,主要获得加速度或者手机朝向
以前在iphone中要得到加速度时,只能使用Accelerometer模块得到重力加速度分量,然后通过滤波得到加速度值。其实在ios中有一个陀螺仪模块,CoreMotion,使用更方便。
deviceMotion.m 外部引用 原始文档
//初始化CoreMotion
#import
CMMotionManager *motionManager = [[CMMotionManage
转载
2016-03-20 11:46:17 ·
1119 阅读 ·
0 评论