7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UIImageViewではアニメーションを実現できる。ようはパラパラマンガみたいな感じ。

animationImages.m
//アニメーションの素材
UIImage* img0 = [UIImage imageNamed:@"img0"];
UIImage* img1 = [UIImage imageNamed:@"img1"];
UIImage* img2 = [UIImage imageNamed:@"img2"];
NSArray* imgArray  = [NSArray arrayWithObjects:img0, img1, img2, nil];

//アニメーションのコマの設定
UIImageView.animationImages = imgArray;
//アニメーションのリピート回数の設定(0は無限ループ)
UIImageView.animationRepeatCount = 0;
//コマの切り替わる時間の設定
UIImageView.animationDuration = 2.0;


//アニメーションの再生
[UIImageView startAnimating]
//アニメーションの停止
[UIImageView stopAnimating]

##参照
iPhoneアプリ開発の虎の巻

7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?