UIView动画不在SKScene工作
MyScene.h
@property (nonatomic) SKLabelNode *tutorialLabel;
MyScene.m
- (IBAction)hideLabel:(id)sender {
[UIView animateWithDuration:1 animations:^(void) {
[_tutorialLabel setAlpha:0.0];
}];
}
是否有更好的方法来隐藏SKLabelNode
答案 0 :(得分:3)
如果您想淡出标签,可以使用SKActions:
- (IBAction)hideLabel:(id)sender {
[_tutorialLabel runAction:[SKAction fadeOutWithDuration:1.0f]];
}