How to detect touches on UIViewController on tvOS

471 views Asked by At

I am making a jumping game for the Apple TV on tvOS. I'd like to know when the user touches the remote in a UIViewController. An action for when the touch begins (character jumps upwards) and when it ends (character falls downwards).

Almost all gesture examples on the Apple documentation site are for clicking, not simply touching without pressing. Does anyone know how to do this in Swift for tvOS?

1

There are 1 answers

0
Justin Voss On BEST ANSWER

You can use touchesBegan and touchesEnded just like on iOS.