Loading a Scene View
Navigate to the GameViewController
class. If you created the program in Chapter 5, viewDidLoad
may appear familiar. This method is called right after the application’s interface loads:
class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if let scene = GameScene.unarchiveFromFile("GameScene") as? GameScene { // Configure the view. let skView = self.view as SKView skView.showsFPS = false scene.size = skView.bounds.size skView.showsNodeCount = false /* SpriteKit applies additional optimizations to improve rendering performance */ skView.ignoresSiblingOrder ...
Get Learning Swift™ Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.