Reputation: 649
I have an SKLabelNode that I am adding to my scene. I want it to fade out in 3 seconds and so it isn't visible anymore. How would I achieve this effect?
Upvotes: 2
Views: 1021
Reputation: 3077
You can run an action:
[self.labelNode runAction:[SKAction fadeAlphaTo:0.0 duration:3.0] completion:^{
[self.labelNode removeFromParent];
}]
You can leave off the completion block if you don't want to remove it from the scene when you're done.
Upvotes: 4