- (void)viewDidLoad {
// self.SCREEN=[[UIScreen mainScreen]bounds];
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"MainScene" ofType:@"sks"];
self.skScene = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
[self.skView presentScene:self.skScene];
self.skScene.scaleMode=SKSceneScaleModeAspectFill;
self.face=(SKSpriteNode*)[self.skView.scene childNodeWithName:@"face_layer"];
[self.face runAction:[SKAction rotateToAngle:30 duration:0]];
}
face
是场景中的SKSpriteNode
,但是此代码总是在iOS7.1中崩溃,在8.0或8.1中运行。
0xd1b34c: movl $0x0, 0x28(%ecx)
0xd1b353: cmpb $0x0, 0xc(%ecx)
0xd1b357: je 0xd1b364 ; SKCAction::willStartWithTargetAtTime(SKCSprite*, double) + 46
0xd1b359: movl (%ecx), %eax
0xd1b35b: movl 0x28(%eax), %eax Thread1:EXC_BAD_ACCESS(code=1,address=0x36...)
0xd1b35e: addl $0x18, %esp
0xd1b361: popl %ebp
0xd1b362: jmpl *%eax
是iOS7.1的错误吗?感谢