0

以下是我的程序的一部分:

CCSpriteFrameCache *frameCache = [CCSpriteFrameCache sharedSpriteFrameCache];
NSString *plistFileName = [NSString stringWithFormat:@"%@%@", aName, @".plist"];
NSString *pngFileName = [NSString stringWithFormat:@"%@%@", aName, @".png"];

[frameCache addSpriteFramesWithFile:plistFileName textureFilename:pngFileName];
self.sprite = [CCSprite spriteWithSpriteFrameName:@"bandit_standby_1"];
self.batchNode = [CCSpriteBatchNode batchNodeWithFile:pngFileName];

问题出现在最后一行:

self.batchNode = [CCSpriteBatchNode batchNodeWithFile:pngFileName];

在调试模式下编译时,没有任何问题。

但是,将模式更改为释放后,出现错误:

ImageIO:CGImageSourceCreateWithData 数据参数为零

谁能告诉我哪里错了?

4

0 回答 0