gpt4 book ai didi

ios - 连接ViewController和场景来展示广告(SpriteKit)

转载 作者:行者123 更新时间:2023-11-30 12:33:28 25 4
gpt4 key购买 nike

所以我按照本教程展示了横幅广告 http://insaneplatypusgames.com/2016/03/29/adding-admob-banners-to-spritekit-games/

它提供的代码非常简单。我希望在我的应用程序开头的主菜单中添加广告。

我已经完成了最后一步,

// Linking view controller and scene to show ads
scene.ViewController = self

我收到一个错误:

Value of type MainMenuScene has no member 'ViewController' - Did you mean inutViewController? And I didn't mean inputViewController.

您可能需要更多信息,但我不确定是什么,所以我可以将其包括在内。

最佳答案

scene.viewController = self 不是 scene.ViewController = self

viewController 是 GameScene 中类型为 GameViewController 的成员变量。(根据您的教程)

关于ios - 连接ViewController和场景来展示广告(SpriteKit),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43160032/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com