step1
SupportingFilesの中に画像を入れる。
step2
配列を用意する。
NSArray :_array = [NSArray arrayWithObjects:
[UIImage imageNamed:@"a.jpg"],
[UIImage imageNamed:@"b.jpg"],
[UIImage imageNamed:@"c.jpg"],
nil
]
step3
この入れるをImageViewに設定する。
_imageView.animationImages = _array;
step4
次にアニメーションの速度を決める
_imageView.animationDuration = アニメーションの速度
step5
アニメーションの繰り返し回数を設定する。
_imageView.animationRepeatCount = 2;
0を設定すると、無限に繰り返す。
step6
アニメーションを開始数r。
[_imageView startAnimating]
step7
アニメーションの停止
[_imageView stopAnimationg]
0 件のコメント:
コメントを投稿