Apple watchOS 2 加速度计 [英] Apple watchOS 2 Accelerometer

查看:27
本文介绍了Apple watchOS 2 加速度计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑制作一个使用加速度计的 watchOS2 应用程序.如果应用程序在后台运行,它是否仍然能够接收来自加速度计或 CMMotionManager 的输入?

I am thinking of making a watchOS2 app that uses the accelerometer. If the app is running in the background, will it still be able to receive input from the accelerometer or CMMotionManager?

推荐答案

您只能在 watchOS2 应用程序运行时访问实时加速度计数据.但是,您可以访问加速度计历史数据,即您的应用处于后台时的加速度计数据.

You are able to access live accelerometer data only when the watchOS2 app is running. You could however access accelerometer historical data, i.e accelerometer data from when your app was in the background.

观看此 WWDC 演讲以了解更多信息:Core Motion 的新功能

Watch this WWDC talk for more information: Whats new in Core Motion

这篇关于Apple watchOS 2 加速度计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆