ios - 是否可以在全屏 UICollectionViewCell 上呈现 GADInterstitial?

标签 ios swift admob interstitial gadinterstitial

我想知道是否有办法在全屏 UICollectionViewCell 上呈现 GADInterstitial。我查找了 GADInterstitial 委托(delegate)方法,并且 interstitial.present(fromRootViewController:) 是显示它的唯一方法,但在 Collection View 单元格的情况下,广告将保留在其下方,因为它需要一个 rootViewController 来显示。那么如何才能达到这个目标呢?

最佳答案

可以通过使用容器 View 来实现。

Container View: Defines a region of a view controller that can include a Child View Controller

因此您可以将容器 View 添加到UICollectionViewCell

值得一提的是,根据实现情况,您可能会违反插页式广告的使用规则。

关于ios - 是否可以在全屏 UICollectionViewCell 上呈现 GADInterstitial?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54594389/

相关文章:

ios - 签名页面定制

ios - ld : framework not found FirebaseNanoPB

ios - 如何使待办事项列表中生成的文本显示为彩色

iOS:通用应用程序的 adMob?

ios - 如何将 AdMob 横幅放置在底部?

ios - 如何使用自动布局将标签居中放置在自定义单元格上?

iphone - 具有多个 UIImageView 实例的 iOS CGRectIntersectsRect?

swift - 在 Swift 中检查倍数?

json - 在 Swift xcode 6 中从 JSON 中获取值(value)

swift - AdMob 未在真实设备上显示