以下是我的计划的一部分:
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数据参数为nil
谁能告诉我哪里出错了?