2012-12-18 36 views

回答

8

就我對您問題的理解而言,您可以嘗試在UIImageView上使用幀圖像(精確到gif圖像的幀)。

NSArray * imageArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"1.png"], [UIImage imageNamed:@"2.png"], nil]; //this will be the frames of animation images in sequence. 
ringImage = [[UIImageView alloc]initWithFrame:CGRectMake(100,200,600,600)]; 
ringImage.animationImages = imageArray; 
ringImage.animationDuration = 1.5;//this the animating speed which you can modify 
ringImage.contentMode = UIViewContentModeScaleAspectFill; 
[ringImage startAnimating];//this method actually does the work of animating your frames. 

停止動畫,只需使用[ringImage stopAnimating];

不要讓我知道,如果這使用MCSpriteLayer回答您的問題:)

+0

+1 @Dalee Davis .. Nice one –

1

嘿,我剛剛發現這個例子...
您可以通過this link ...
也可以下載link Here

這解決了我的目的,希望這也能幫到你們

相關問題