Ios 链接ViewController和场景以显示广告(SpriteKit)
因此,我按照本教程展示了一个Ios 链接ViewController和场景以显示广告(SpriteKit),ios,swift,sprite-kit,admob,Ios,Swift,Sprite Kit,Admob,因此,我按照本教程展示了一个横幅广告 它提供的代码非常简单。我希望在我的应用程序的开始,在主菜单上添加广告 我走到最后一步 // Linking view controller and scene to show ads scene.ViewController = self 我得到一个错误: MainMenuScene类型的值没有成员“ViewController”-是吗 你是说inutViewController?我不是指inputViewController 您可能需要更多的信息,但我不
横幅广告
它提供的代码非常简单。我希望在我的应用程序的开始,在主菜单上添加广告
我走到最后一步
// Linking view controller and scene to show ads
scene.ViewController = self
我得到一个错误:
MainMenuScene类型的值没有成员“ViewController”-是吗
你是说inutViewController?我不是指inputViewController
您可能需要更多的信息,但我不确定我能包含哪些信息。
scene.viewController=self
不scene.viewController=self
viewController是游戏场景中类型为
GameViewController
的成员变量。(根据您的教程)或者如果有人知道另一个教程,他们可以告诉我,那也太棒了。谢谢,我将其更改为scene.viewController,我收到了相同的错误,但现在已更正了类型。你还有别的建议吗?