我有五张图片,我只需要在屏幕上为它们设置不同和同时。我有不同的动画代码,但他们使用图像序列来创建动画..或者他们为单个图像设置动画。请帮忙
非常感谢@Rob和@Aadhira感兴趣。这是我的代码,它可以线性移动一个图像。我如何在曲线中为它设置动画
if(isAnimate) {
NSLog(@"+30,+15");
[UIView beginAnimations: @"moveView" context: nil];
[UIView setAnimationDelegate: self];
[UIView setAnimationDuration: 0.5];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
searchLight1.frame = CGRectMake(searchLight1.frame.origin.x+30, searchLight1.frame.origin.y + 15, searchLight1.frame.size.width, searchLight1.frame.size.height);
[UIView commitAnimations];
isAnimate = NO;
}
else {
NSLog(@"-30,-15");
[UIView beginAnimations: @"moveView" context: nil];
[UIView setAnimationDelegate: self];
[UIView setAnimationDuration: 0.5];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
searchLight1.frame = CGRectMake(searchLight1.frame.origin.x-30, searchLight1.frame.origin.y -15, searchLight1.frame.size.width, searchLight1.frame.size.height);
[UIView commitAnimations];
isAnimate = YES;
}
答案 0 :(得分:0)
这完全取决于您想要的动画类型以及您拥有的代码。如果你发布,那就更好了。
无论如何,您知道如何为单个图像设置动画。然后开始动画5个不同块中的5个图像。