在我的GameView Controller.swift文件中,我删除了viewDidLoad并放入了viewWillLayoutSubviews,因为我将在计算中使用设备的尺寸。但是,hello world SKLabelNode不再显示在模拟器中。关于我做错了什么想法?
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
let skView = self.view as SKView
if skView.scene != nil{
skView.showsFPS = true
skView.showsNodeCount = true
skView.showsPhysics = true
// Create and configure the scene
let scene = SKScene(size: skView.bounds.size)
scene.scaleMode = SKSceneScaleMode.AspectFill;
// Present Scene
skView.presentScene(scene)
}