0
所以,当我的视图控制器负载我开始发送adBanner请求..暂停iAd的请求发出
- (void)viewDidLoad{
[super viewDidLoad];
self.canDisplayBannerAds = YES;
}
但是从我的场景时,我的比赛,即使我设置canDisplayBannerAds为NO,我得到一个错误... 我已作了评论错误调试通过
- (IBAction)startGame:(id)sender {
NSLog(@"Start Game triggered");
adBanner.hidden = 1;
self.canDisplayBannerAds = NO;
// Configure the view.
// Configure the view after it has been sized for the correct orientation.
skView = (SKView *)self.view;
if (!skView.scene) { // the error happens during this if statement
skView.showsFPS = YES;
skView.showsNodeCount = YES;
// Create and configure the scene.
theScene = [TCAMyScene sceneWithSize:skView.bounds.size];
theScene.scaleMode = SKSceneScaleModeAspectFill;
theScene.delegate = self;
// Present the scene.
[skView presentScene:theScene];
}
}
错误开始的:
终止应用程序由于未捕获的异常“NSInvalidArgumentException”,原因: ' - [UIView的场景]:无法识别的选择发送到实例0x16d252a0'
问题是什么?我该如何解决这个问题?
你这是在更换SKView正确的,所以我增加了以下和Im现在好了。感谢那! skView =(SKView *)self.originalContentView; – 4GetFullOf