Struggling with understanding the best approach for capturing gestures from the AppleTV default remote for a SpriteKit game. Please someone point me to a source example of best practices! What I have discovered so far is that utilizing touchesBegan touchesEnded on the SKScene doesn't work for interupreting gestures (if there is a proper way it is certanly nothing like how these methods behavior on touch screne devices).
It seems the recommended path is to capture gestures though UISwipeGestueRecognizer. Which I have tried
Inside
override func didMoveToView(view: SKView) {
...
let swipeRecognizer = UISwipeGestureRecognizer(target: self, action: "swiped:")
swipeRecognizer.direction = .Right
view.addGestureRecognizer(swipeRecognizer)
}
//and of course the handler (not 100% sure this is correct as I am assumiing it is associated with the line above view.addGestureRecognizer(swipeR....)
@IBAction func swipeRecognizer(recognizer:UISwipeGestureRecognizer) {
print("got here code:001B")
}
It's been an extreemly frustrating experience working with the AppleTV OS dev kit with SpriteKit and most of that is around UI differences which are not documented and zero code examples exist. Apple should have provided more context sensitive examples. I would like to see very basic example exclusive to SpriteKit for how to properly capture gestures from the remote and all available buttons. I would pay for this example as at this point the user input captue has become the blocker for us.