خرید بک لینک

Vote count: 0

    self.smallScreen = (self.childNodeWithName("screen") as? SKShapeNode)!
    self.smallScreen.position = CGPoint(x: self.frame.size.width/2, y: self.frame.size.height * 2/3)

    screenLabel.text = "Screen"
    screenLabel.fontSize = 30
    screenLabel.fontColor = UIColor.redColor()
    screenLabel.position = CGPoint(x: self.frame.size.width/2, y: self.frame.size.height * 2/3)
    screenLabel.hidden = false
    self.smallScreen.addChild(screenLabel)

I created a SKShapeNode called smallScreen and an SKLabelNode with the name screenLabel.

I later attempted to display screenLabel in smallScreen. When I ran the code however, it didn't work. I tried adding screenLabel as a child to self, and that seemed to allow the text to display. Whenever I added screenLabel as a child node to smallScreen, it wouldn't display. Please help, much thanks.

asked 21 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 6 مرداد 1395 ساعت: 7:50

صفحه بندی