我有一个背景图像和12个中心针图像的动画。它的运行正常,但每次它显示图像和图像后,我只是希望它在图像之间平滑运行。我怎样才能做到这一点?如何创建流畅的图像动画
这里是我当前的代码:
- (IBAction)startAnimation:(id)sender
{
imgAnimation.frame = CGRectMake(0, 0, 184.5f, 172.5f);
imgAnimation.center = CGPointMake(160, 164);
imgAnimation.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"pointer01.png"],
[UIImage imageNamed:@"pointer02.png"],
[UIImage imageNamed:@"pointer03.png"],
[UIImage imageNamed:@"pointer04.png"],
[UIImage imageNamed:@"pointer05.png"],
[UIImage imageNamed:@"pointer06.png"],
[UIImage imageNamed:@"pointer07.png"],
[UIImage imageNamed:@"pointer08.png"],
[UIImage imageNamed:@"pointer09.png"],
[UIImage imageNamed:@"pointer10.png"],
[UIImage imageNamed:@"pointer11.png"],
[UIImage imageNamed:@"pointer12.png"], nil];
[imgAnimation setAnimationRepeatCount:5];
[imgAnimation setAnimationDuration:4.0f];
[imgAnimation startAnimating];
}
你不是指这个问题问几个小时前,只? http://stackoverflow.com/questions/10053207/how-to-animate-a-set-of-images。 Dupe帐户? – 2012-04-07 13:10:41
这不是我想要做的。 – 2012-04-07 13:14:22
好..对不起.. :-)) – 2012-04-07 13:18:16