gpt4 book ai didi

ios - 标签栏应用程序中的 iAd

转载 作者:行者123 更新时间:2023-11-28 20:15:49 27 4
gpt4 key购买 nike

如何在Tab栏下方添加iAd,我在rootviewcontroller中添加了tab栏

self.window.rootViewController = tabBarController;

对于任何单个 View Controller ,通过

在 vi​​ewController 中添加 iAd
 [self.contentView addSubview:viewController1.view]; 
[self.view addSubview:contentView];
[self.view addSubview:adBannerView];

正在工作,但是标签栏 Controller 的代码

[self.contentView addSubview:tabBarcontroller.view]; 
[self.view addSubview:contentView];

标签栏 Controller 未加载,如何添加这个,谢谢 adv

最佳答案

最好的是您遵循 iAD suite 中描述的模式(Apple 网站上的示例代码)。您获得的最大优势是在更改 View Controller 时不会丢失横幅。这个想法是你有一个 BannaerManager 的实例,它与一个可见的 BannerViewController 共享它的 iAD 横幅,它是你的 VC 的容器。

关于ios - 标签栏应用程序中的 iAd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18118725/

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