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

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

问题描述

我无法在新的 Apple TV Siri Remote 上找到与左右颠簸相关的任何文档.您可以在此视频的 1:00 看到此操作,动手:Apple TV 2015 蓝牙触控,运动&Siri 遥控器.

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?

推荐答案

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

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.

视频中基于加速度计的动作应该可以通过 GameControllerKit 的 GCMotion API 实现.

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

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

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