How to detect bumps via Apple TV Siri Remote

删除回忆录丶 提交于 2019-12-06 07:12:18

问题


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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/32575648/how-to-detect-bumps-via-apple-tv-siri-remote

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!