Skip to content

Instantly share code, notes, and snippets.

@veeneck
Created June 17, 2014 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veeneck/5d33927ac203c4c96dfd to your computer and use it in GitHub Desktop.
Save veeneck/5d33927ac203c4c96dfd to your computer and use it in GitHub Desktop.
Swift view Controller
if let scene = Foothills.unarchiveFromFile("Foothills") as? SKScene {
Foothills.loadSceneAssetsWithCompletionHandler({
// Configure the view.
let skView = self.view as SKView
skView.showsFPS = true
skView.showsNodeCount = true
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = true
/* Set the scale mode to scale to fit the window */
scene.scaleMode = .AspectFill
skView.presentScene(scene)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment