I've got a SpriteKit game that registers the pause event that occurs when the Menu button is pressed - it's basically the code from DemoBots:
private func registerPauseEvent() {
gameController.controllerPausedHandler = { [unowned self] _ in
self.gameStateDelegate?.controlInputSourceDidTogglePauseState(self)
}
}This works fine and causes my pause menu to display... but only briefly, as tvOS still goes back to the main AppleTV menu - when I go back into the game my pause menu is there, ready and waiting.
This is probably a dumb question, but how do I say 'hey, stay in the game, I'll handle it'? I've tried to work out the DemoBots code, where the pause menu works as expected, but it fairly complicated (to me!) and I'm unable to follow what's going on.