Transition to other scenes in swift spritekit

Today I have been tinkering with my new swift project that I started and found a good way to do the transitioning to other scenes via storyboards.

Drag and drop a View Controller in Main.storyboard, and set up a Button for it. Control & drag the button in the new UIViewController for your story board for creating a method for starting the game.

Since you already had the GameView Controller in the beginning lets test it out by controll drag the yellow button to the View inside the GameView Controller and select show. Remember to set the identifier such as “toGameView” in the storyboard Segue for the id.

Finally, inside the method you created earlier, add the following method

 self.performSegueWithIdentifier("toGameView", sender: self)

Leave a Reply

Your email address will not be published. Required fields are marked *