2011-08-15 12 views

答えて

0

は限り私は、iPhone SDKのdoesntのを知っているようgif animaitonをサポートしていないあなたはUIViewの

2

のiOSを経由してアニメーションを自分で行うにする必要があり.gifsを行います。あなたはそのようにそれを行う必要があるでしょう -

-(void)startImageViewAnimation 
{ 
NSArray *animationImages = [NSarray arrayWithObjects:[UIImage imageNamed:@"1.png"], 
[UIImage imageNamed:@"2.png"], 
[UIImage imageNamed:@"3.png"],nil]; 

UIImageView *imageView = [UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)]; 
imageView.animationImages = animationImages ; 
imageView.animationRepeatCount = 2; 
imageView.animationDuration= 4.0; 
[imageView startAnimating]; 

[NSTimer scheduledTimerWithTimeInterval:4.0 target:self 
selector:@Selector(animationDone:) 
userInfo:nil repeats:NO]; 
} 

-(void)animationDone:(NSTimer*)inTimer 
{ 
[inTimer invalidate]; 
inTimer = nil; 
NSLog(@"animationDone "); 
} 
+0

を私はすべてのセルにImageViewAnimationを取る必要があります、ありがとう、それが意味私は同時にNSTimerを大量に構築する必要がありますか? – Allren

関連する問題