首先請原諒我也許小白的問題! 我的目標C全新!顯示在圖像動畫結束的最後一個圖像
我想動畫圖像,並在動畫結束時應顯示動畫「dymchart20.png」的最後一個圖像。 我怎樣才能做到這一點?
,這裏是我的動畫代碼:
aniChartView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"dymchart01.png"],
[UIImage imageNamed:@"dymchart02.png"],
[UIImage imageNamed:@"dymchart03.png"],
[UIImage imageNamed:@"dymchart04.png"],
[UIImage imageNamed:@"dymchart05.png"],
[UIImage imageNamed:@"dymchart06.png"],
[UIImage imageNamed:@"dymchart07.png"],
[UIImage imageNamed:@"dymchart08.png"],
[UIImage imageNamed:@"dymchart09.png"],
[UIImage imageNamed:@"dymchart10.png"],
[UIImage imageNamed:@"dymchart11.png"],
[UIImage imageNamed:@"dymchart12.png"],
[UIImage imageNamed:@"dymchart13.png"],
[UIImage imageNamed:@"dymchart14.png"],
[UIImage imageNamed:@"dymchart15.png"],
[UIImage imageNamed:@"dymchart16.png"],
[UIImage imageNamed:@"dymchart17.png"],
[UIImage imageNamed:@"dymchart18.png"],
[UIImage imageNamed:@"dymchart19.png"],
[UIImage imageNamed:@"dymchart20.png"],nil];
// all frames will execute in 3 seconds
aniChartView.animationDuration = 0.8;
// repeat the annimation forever
aniChartView.animationRepeatCount = 1;
// start animating
[aniChartView startAnimating];
感謝您的幫助!
謝謝你這麼多SonGoku68 !我做到了,它就像一個魅力! –