Reputation: 1477
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.
Upvotes: 2
Views: 957
Reputation: 10674
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
Upvotes: 3