2

Okay so I have implemented a simple SKLabelNode with some text.

I want to add a fade animation when I change the text.

I know there is an easy way to do it with UILabels but I cant figure out how to do it with SKLabels.

Benja0906
  • 1,437
  • 2
  • 15
  • 25

1 Answers1

3

You need to run an SKAction (fade) on it

let label = SKLabelNode(...
label.fontSize = ...
label.fontColor = ...
label.position = ...
addChild(label)

let fadeAction = SKAction.fadeAlphaTo(0.5, duration: 1)
label.runAction(fadeAction)

Hope that helps

crashoverride777
  • 10,581
  • 2
  • 32
  • 56