I wanted to create a game in Xcode 7.2. I wanted to create an information screen that will be inside. But nothing appears on the newly created scene. No matter what I get on a new scene, like images, sprites, labels. When I start it, nothing appears on the screen. But the code I wrote to create the shortcut works fine in the "GameScene" that the game originally contains.
The code I entered in InfoScene looks like this:
import SpriteKit
class InfoScene: SKScene {
override func didMoveToView(view: SKView) {
let thanksLabel = SKLabelNode(fontNamed:"Arial")
thanksLabel.text = "Thank you for Playing!"
thanksLabel.fontSize = 45
thanksLabel.position = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMidY(self.frame))
self.addChild(thanksLabel)
}
}
Nothing seems wrong to me. If I put the above code in the GameScene that the template originally had, a label will appear. In addition, if I add a sprite to the scene, it will not appear either. It really bothers me.