小编Vor*_*mer的帖子

因未捕获的异常'未找到纹理图集'而终止应用

我创建了一个使用Sprite Kit进行简单动画的项目.它运作良好,并没有问题.合并我们的工作副本中的文件时发生错误.

NSMutableArray *dPFrames = [NSMutableArray array];

SKTextureAtlas *dPAtlas = [SKTextureAtlas atlasNamed:@"dP"]; <<---- Thread 1: signal SIGBART

int numImages = dPAtlas.textureNames.count;

for (int i=1; i <= numImages; i++) {
    NSString *textureName = [NSString stringWithFormat:@"dP%d@2x", i];
    SKTexture *temp = [dPAtlas textureNamed:textureName];
    [dPFrames addObject:temp];

}
_dPAnimateFrames = dPFrames;

SKTexture *temp = _dPAnimateFrames[0];
_dP = [SKSpriteNode spriteNodeWithTexture:temp];
_dP.position = CGPointMake(150, 110);
[self addChild:_dP];
Run Code Online (Sandbox Code Playgroud)

这是控制台中的消息:

2013-10-09 10:52:14.777 MyProject [1550:a0b] *因未捕获的异常'未找到纹理图集'而终止应用程序,原因:'未找到纹理图集'

我有搜索和研究的答案,但不幸的是我什么都没发现.如果有,请分享解决方案.

xcode objective-c ios

9
推荐指数
2
解决办法
1706
查看次数

标签 统计

ios ×1

objective-c ×1

xcode ×1