如何通过Apple TV Siri Remote检测颠簸 [英] How to detect bumps via Apple TV Siri Remote

查看:94
本文介绍了如何通过Apple TV Siri Remote检测颠簸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在新的Apple TV Siri Remote上找不到与左右颠簸有关的任何文档。您可以在以下视频的1:00观看此操作,动手:Apple TV 2015蓝牙触摸,运动与Siri Remote

I'm unable to find any documentation relating to right and left bumps on the new Apple TV Siri Remote. You can see this in action at 1:00 of this video, Hands On: Apple TV 2015 Bluetooth Touch, Motion & Siri Remote.

远程和交互提到了位置轻拍,但这些颠簸是由视频提示的加速度计触发的。

Remote and Interactions mentions positional taps, but these bumps are triggered by the accelerometer, suggested by the video.

这些凸点实际上是位置分接吗?我如何检测左和右碰撞

Are these bumps actually positional taps? How can I detect left and right bumps?

推荐答案

点击(不单击物理按钮)触摸板的边缘将合成定向运动事件,如您提供的文档链接中所述。您应该能够使用配置了适合相关边缘的 allowedPressTypes 的一个或多个 UITapGestureRecognizer 实例检测到这些)。这样的手势识别器还将识别游戏控制器的dpad按钮按下和来自较旧的Apple Remote设备的方向性点击。

Tapping (without clicking the physical button) on the edges of the touchpad will synthesize a directional movement event, as described in the documentation link you provided. You should be able to detect these with one or more UITapGestureRecognizer instances configured with the allowedPressTypes appropriate for the relevant edge(s). Such a gesture recognizer will also recognize game controller dpad button presses and directional clicks from older Apple Remote devices.

视频中基于加速度计的动作应该可以通过 GCMotion 来自GameControllerKit的API。

The accelerometer-based action from the video should be achievable with the GCMotion API from GameControllerKit.

这篇关于如何通过Apple TV Siri Remote检测颠簸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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