How to detect bumps via Apple TV Siri Remote

2020-07-18 11:05发布

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条回答
乱世女痞
2楼-- · 2020-07-18 11:47

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.

查看更多
登录 后发表回答