我有一個背景圖像和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