我有2个动画。第一个是应用程序加载时的第一个,第二个将保持用户体验的其余部分。IOS应用程序切换动画“A”与动画“B”在同一个地方
这是我想在其中加载应用程序加载时,简单地说
1)动画“A”的事情。 2)然后我想隐藏动画a“A”并用相同坐标上的动画“B”代替它3)动画“B”在任何其他时间或间隔30秒或45秒播放动画
动画一个
[UIView animateWithDuration:2.5
delay:2.0
options:UIViewAnimationCurveEaseIn
animations:^{[buhoButton setFrame:CGRectMake(91, 185, 130, 130)];}completion:nil];
动画乙
animation.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"Buho128x128_0.png"],
[UIImage imageNamed:@"Buho128x128_1.png"],
[UIImage imageNamed:@"Buho128x128_2.png"],
[UIImage imageNamed:@"Buho128x128_3.png"],
[UIImage imageNamed:@"Buho128x128_4.png"],
[UIImage imageNamed:@"Buho128x128_3.png"],
[UIImage imageNamed:@"Buho128x128_2.png"],
[UIImage imageNamed:@"Buho128x128_1.png"],
[UIImage imageNamed:@"Buho128x128_0.png"], nil];
[animation setAnimationRepeatCount:-1];
animation.animationDuration = 1;
[animation startAnimating];
这可能吗?
当A完成时,它开始动画B.现在,我面临着如何隐藏动画A一旦完成,只是动画B留在后面。 – Jiraheta
当动画A完成时,您想要隐藏按钮吗?如果是这样,请设置buhoButton.hidden = YES;在完成块。 – ale84
伙计!那就像魅力一样工作!非常感谢。 – Jiraheta