To make a new scene you simply create a new file for a scene class (look under iOS, then resources, you will see a sprite kit scene template). Now, to switch between scenes go back in your code and when you want to switch between them you would write this:
In Swift:
let scene = GameScene(size: CGSizeMake(1024,768))
scene.scaleMode = SKSceneScaleMode.AspectFill
let skView = self.view as SKView
let transition = SKTransition.flipVerticalWithDuration(0.5)
skView.presentScene(scene, transition: transition)
Or in Objective-C:
MenuScene *nextScene = [[GameScene alloc] initWithSize:CGSizeMake(1024, 768)];
nextScene.scaleMode = SKSceneScaleModeAspectFill;
SKTransition *transition = [SKTransition flipVerticalWithDuration:0.5];
[self.view presentScene:nextScene transition:transition];
Here's a brief explanation of each line.
First, you are initializing a scene, and specifying its size.
let scene = GameScene(size: CGSizeMake(1024,768))
This is the scene size by default, in case you were wondering about the numbers.
Then you need to specify its scaleMode, which by default is aspect fill (thats also the one I use)
scene.scaleMode = SKSceneScaleMode.AspectFill
Next, you can have a transition which is basically a fancy way of animating from one scene to the other
let transition = SKTransition.flipVerticalWithDuration(0.5)
Finally, you use your SKView
(self.view
) to present your new scene.
skView.presentScene(scene, transition: transition)