chefAnimation.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"chef_good1.png"], //動畫由哪些圖片組成
[UIImage imageNamed:@"chef_good2.png"],
[UIImage imageNamed:@"chef_good2.png"],
[UIImage imageNamed:@"chef_good2.png"],
[UIImage imageNamed:@"chef_good2.png"],
nil];
[chefAnimation setAnimationRepeatCount:3]; //動畫重覆播放的次數
chefAnimation.animationDuration = 3; //動畫每一輪的時間(秒)
[chefAnimation startAnimating]; //開始執行動畫
}
0 意見:
張貼留言