Xcode says that the "shouldAutorotate" code is undeclared. But I don't write this code. It is supplied by Apple, isn't it. This is the code:
SKView * skView = (SKView *)self.view;
skView.showsFPS = YES;
skView.showsNodeCount = YES;
/ Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = YES;
/
GameScene *scene = [GameScene nodeWithFileNamed:@"GameScene"];
scene.scaleMode = SKSceneScaleModeAspectFill;
/
[skView presentScene:@"scene"]; //Another error:"incompatible pointer types sending 'NSString*' to parameter of type 'SKScene _Nullable'"
- (BOOL)shouldAutorotate{ // Error in this line :"Use of undeclared identifier 'shouldAutorotate' "
return YES;
}
Please help me. Thank you.