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

查看:163
本文介绍了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天全站免登陆