Best way to pause SpriteKit game

Hi. Anyone know where some example code is that has a good way to pause a SpriteKit game based on one view controller with many scenes? During the pause there should be buttons to resume or exit etc I've got something working but it causes unwanted effects (crashes) if I exit back to home screen during the pause and then go back to the game. I know the concepts and basics. Just need to see an example working to get the bugs out of my implementation Thanks

There have been multiple discussions on this forum, you should search for pause scene, it all depends on what you want to achieve.


You can pause the SKView, or substitute a pause scene then go back to your game scene.


Check this thread for example, read it to the end as some information upthread can be misleading. Green post has what you need : https://forums.developer.apple.com/message/126196#126196

thanks for that. I wonder if there is a Swift version ?

Best way to pause SpriteKit game
 
 
Q