インターネットからアニメのかがり火をダウンロードしました。私のイメージ シーケンスは "*.png" で、うまくいきません。最後までループし続けます。画像は表示されません。このコードをアニメーション化できないのはなぜですか? 私は何を間違えましたか?
UIImageView* campFireView = [[UIImageView alloc] initWithFrame:screenx.frame];
int j;
int i;
for (j = 1, i = 0; i < 28; i =1)
{
NSLog( @"%i.png", i);
campFireView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:[NSString stringWithFormat:@"%i.png",i]], nil];
}
// all frames will execute in 1.75 seconds
campFireView.animationDuration = .15;
// repeat the annimation forever
campFireView.animationRepeatCount = 1;
// start animatinganimationRepeatCount:1];
[campFireView startAnimating];
// add the animation view to the main window
[self.view addSubview:campFireView];
[campFireView release];