我有这个动画,其中有一个背景图像和 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];
}