iOS 10 iPhone 6S使用Taptic引擎播放触觉反馈或振动 [英] iOS 10 iPhone 6S Play Haptic feedback or vibrate using taptic engine

查看:85
本文介绍了iOS 10 iPhone 6S使用Taptic引擎播放触觉反馈或振动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhone6s是否具有Taptic引擎,我可以使用名为UIFeedbackGenerator的公共API来访问它吗?

Iphone6s has taptic engine or not, can I use a public API called UIFeedbackGenerator to access it?

推荐答案

iPhone 7具有比iPhone 6s更精确,更灵活的Taptic Engine-您可以使用

iPhone 7 has a more precise, more flexible Taptic Engine than iPhone 6s — you can use the UIFeedbackGenerator class cluster to get at the richer vocabulary of haptic feedback signals that iPhone 7 supports, but these APIs have no effect on iPhone 6s (or other devices).

iPhone 6s仍然具有Taptic Engine,但它不如更新的功能强大-它仅支持与3D Touch功能相关的触觉信号.但是,可以在您的应用程序中使用它们:

iPhone 6s still has a Taptic Engine, but it's not as capable as the newer one — it supports only the haptic signals associated with 3D Touch features. However, it is possible to use those in your app:

  • to build a standard Peek/Pop UI (haptics included) into your app, use standard views that already do it (like table and collection views), set peek/pop segues in your storyboard, and/or adopt the UIViewControllerPreviewing and UIViewControllerPreviewingDelegate protocols in your view controller. You can do this in iOS 9.

要提供窥视/弹出手势支持(包括附带的触觉反馈),而无需使用UI或使用您自己的自定义UI,请使用委托协议.这部分需要iOS 10.

to provide peek/pop gesture support — including the accompanying haptic feedback — without a UI, or with your own custom UI, use the UIPreviewInteraction class and its delegate protocol. This part requires iOS 10.

有关总体上的peek/pop,3D Touch和触觉的更多信息,请参阅WWDC16会话和Apple的

For more info about peek/pop, 3D Touch, and haptics in general, see the WWDC16 session "A Peek at 3D Touch" and Apple's guide to Adopting 3D Touch on iPhone.

这篇关于iOS 10 iPhone 6S使用Taptic引擎播放触觉反馈或振动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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