在iPhone5S中使用M7芯片 [英] Utilizing the M7 chip in the iPhone5S

查看:26
本文介绍了在iPhone5S中使用M7芯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人可以为我指明在 iPhone5S 及更高版本中使用 M7 芯片的正确方向.

I was wondering if anyone can point me in the right direction with regard to utilzing the M7 chip in the iPhone5S and above.

我想知道它是否只是在您使用通用核心运动 API 时自动使用,还是有一组特定的 API 可供使用?

I was wondering if it's just automagically used when you use general core motion APIs or is there a specific set of APIs to use?

最后我在网上阅读一些文章时注意到它保留了一些历史运动数据,有人知道如何访问它或者有人能指出我正确的方向吗?

Finally I noted whilst reading some articles online that it keeps some historical movement data, anyone know how to access this or can anyone point me in the right direction?

推荐答案

您正在寻找的两个主要类是 CMMotionActivityManagerCMMotionActivity.第一个让您可以查询历史数据并管理一般的运动.第二个让您可以访问不同的、更具体的运动类型.

The two main classes you're looking for are CMMotionActivityManager and CMMotionActivity. The first lets you query historical data and manage motion in general. The second gives you access to different, more specific types of motion.

这两个类仅在iOS 7上可用.首先使用-[CMMotionActivityManager isActivityAvailable]判断运动是否可用.我没有找到任何关于它的文档,但我的猜测是该方法只会在具有 M7 芯片(或支持运动活动报告的未来芯片)的设备上返回 YES.

These two classes are available only on iOS 7. Use -[CMMotionActivityManager isActivityAvailable] to determine if motion is available first. I have not found any documentation on it, but my guess is that method will only return YES on devices that have the M7 chip (or future chips that support motion activity reporting).

这篇关于在iPhone5S中使用M7芯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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