我想知道是否有办法在全屏 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/