- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何在 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/
我是一名优秀的程序员,十分优秀!