我想使用iPhone的加速度计来获取加速度计值的日志文件(可能是24小时)。当其他应用程序运行时,是否可以让加速度计在后台运行?
如果您的应用程序因其他原因被允许在后台运行,您现在就可以执行此操作。查看核心运动 APIstartAccelerometerUpdatesToQueue:withHandler:
method here https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMMotionManager_Class/index.html#//apple_ref/occ/instm/CMMotionManager/startMagnetometerUpdatesToQueue:withHandler:.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)