“无法恢复当前帧”在iPhone上播放动画

时间:2009-09-03 04:27:46

标签: iphone objective-c

当我们尝试一次又一次地播放带有100张图像的动画时,我在iphone上的应用程序退出并显示以下控制台消息。

Program received signal:  “0”.
warning: check_safe_call: could not restore current frame

所以我想知道如何删除此崩溃。我用动画做错了吗?代码如下:

catAnimationImageView.image = [UIImage imageNamed:@"SZ_Interior_Idle3_0.png"];

NSMutableArray *arr = [ [NSMutableArray alloc] initWithCapacity:114];
for(int iLoop = 0; iLoop < 114; iLoop++)
{
    [arr addObject:[UIImage imageNamed:[ NSString stringWithFormat:@"SZ_Interior_Idle3_%d.png",iLoop]]];
}
catAnimationImageView.animationImages = arr;

catAnimationImageView.animationDuration = 10;
catAnimationImageView.animationRepeatCount = 1;
catAnimationImageView.alpha = 1;
[[delegate getMidGroundView] addSubview:catAnimationImageView];
[arr release];

[catAnimationImageView startAnimating];

1 个答案:

答案 0 :(得分:0)

[arr release];

您将在动画开始前发布您的图像数组。