iPhone アプリの基本的なアニメーションを作成しています。2 種類のアニメーションから選択できます。これは使える…
NSArray *myImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"myImage1.png"], [UIImage imageNamed:@"myImage2.png"], [UIImage imageNamed:@"myImage3.png"], [UIImage imageNamed:@"myImage4.gif"], nil]; UIImageView *myAnimatedView = [UIImageView alloc]; [myAnimatedView initWithFrame:[self bounds]]; myAnimatedView.animationImages = myImages; myAnimatedView.animationDuration = 0.25; [self addSubview:myAnimatedView]; [myAnimatedView release];
またはこのようなもの...
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.5];
// other animations goes here
myImage.transform = CGAffineTransformMakeRotation(M_PI*0.5);
// other animations goes here
[UIView commitAnimations];
アニメーション化するパーツがかなりあるので、使用するメモリ量が最も少なく、実行速度が最も速いオプションを選択したいと考えています。どんなアドバイスでもいいです、ありがとう