Created
April 3, 2014 22:25
-
-
Save veeneck/9964115 to your computer and use it in GitHub Desktop.
Switch scenes in Sprite Kit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace NAMEOFSCENE in code | |
-(void) switchScene { | |
SKTransition *reveal = [SKTransition fadeWithDuration:3]; | |
SKScene *scene = [NAMEOFSCENE sceneWithSize:self.view.bounds.size]; | |
scene.scaleMode = SKSceneScaleModeAspectFill; | |
[self.view presentScene:scene transition:reveal]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment