gpt4 book ai didi

IOS CollectionView 页脚添加 Google AdMob

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

如何在 UICollectionView“页脚”中添加 google AdMob?

我直接在UICollectionReusableView中添加了一个UIView,报错:

The bannerView outlet from the CollectionViewController to the GADBannerView is invalid. Outlets cannot be connected to repeating content.

我使用 UIView 来获取 AdMob,如下所示: https://developers.google.com/mobile-ads-sdk/docs/admob/ios/quick-start

还有其他方法可以在 CollectionView“页脚”中添加 google AdMob 吗?

非常感谢!

最佳答案

错误告诉你问题所在:“Outlets cannot be connected to repeating content”

不允许在重复的内容 View 中放置广告,如 Collection View 、表格 View 等。

这是因为有些广告按展示次数付费,在重复观看中,广告可能会加载多次,每次都会产生展示次数。广告公司不喜欢你这样做,因为他们必须为错误的印象向你付费(这与拥有一个带有广告的网页一样,该网页会自行刷新以尝试获得更多广告收入)。

我根据自己的经验了解到这一点,我将广告放置在用户意外点击的位置 - 我没有收到用户对其放置的任何投诉,但在 Admob 注意到它产生了多少收入后,他们限制了我的收入率降低到正常的 5%,并告诉我在我移动广告之前不会再增加。所以你有它。不要将您的广告放在 Collection View 或表格 View 中。

关于IOS CollectionView 页脚添加 Google AdMob,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28021783/

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