1

I have a UIViewController which inherits from GCEventViewController and I register a value change handler for the GCController microPad Profile.

But when I use the SiriRemote in the Simulator none of my handling methods is called. When I stop with the touches the touchesEnded function is called though on that particular view controller.

This is are excerpts of my code:

var gameController : GCController? {
    get {
        return self.currentGameController
    }
    set(v) {
        self.currentGameController = v
        self.controllerUserInteractionEnabled = false
        if let microPad = v!.microGamepad {
            microPad.allowsRotation = false
            microPad.reportsAbsoluteDpadValues = true
            microPad.valueChangedHandler = self.microPadValueChangeHandler
        }

    }
}
...
 override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
    log.info("||||| TOUCHES ENDED IN GAMEVIEW_CONTROLLER |||||.")
}

func microPadValueChangeHandler( _ gp : GCMicroGamepad , _ gc : GCControllerElement ) {
    log.info("||||||||| microPadValueChangeHandler ||||||")
    log.info("|||||||||||||||||||||||||||||||||||||||||||")
    log.info("")
}

...

Any ideas why the microPadValueChangeHandler is NOT called and the touchedEnded is called?

Any help is greatly appreciated.

Cheers,

Frank

Frank Marx
  • 11
  • 2
  • Nothing in your question seems inherently better answered by a Game Developer, there are a lot more Swift + TVOS developers on StackOverflow, I suggest you ask your question there if you want a more detailed and immediate response to your problem. –  Jul 18 '16 at 01:16

0 Answers0