我正在尝试label
在我的设备上创建一个,SKScene
但它没有出现。我不知道出了什么问题。代码看起来非常好:
class end: SKScene {
var label = UILabel()
override func didMoveToView(view: SKView) {
scene?.backgroundColor = UIColor(red: CGFloat(59.0/255.0), green: CGFloat(89.0/255.0), blue: CGFloat(152.0/255.0), alpha: CGFloat(1.0))
label.text = "Game Over!"
label.backgroundColor = UIColor.blackColor()
label = UILabel(frame: CGRect(x: 0, y: 0, width: view.frame.width/3, height: 30))
label.center = CGPoint(x: view.frame.size.width / 2, y: view.frame.size.width/7)
label.textColor = UIColor.whiteColor()
self.view?.addSubview(label)
}
}