简体   繁体   English

是否可以在全屏UICollectionViewCell上显示GADInterstitial?

[英]Is it possible to present GADInterstitial on a full-screen UICollectionViewCell?

I wonder if there's a way to present a GADInterstitial over a full-screen UICollectionViewCell. 我想知道是否有办法在全屏UICollectionViewCell上呈现GADInterstitial。 I've looked up for GADInterstitial delegate methods and the interstitial.present(fromRootViewController:) is the only method to display it, but in case of collection view cell the ad will be left under it, as it needs a rootViewController to be displayed on. 我一直在寻找GADInterstitial委托方法,而interstitial.present(fromRootViewController:)是显示它的唯一方法,但是如果是集合视图单元格,则该广告将留在其下,因为它需要在其上显示rootViewController 。 So how's that can be reached? 那怎么可以达到呢?

It is possible by using a Container View. 使用容器视图是可能的。

Container View: Defines a region of a view controller that can include a Child View Controller 容器视图:定义视图控制器的区域,其中可以包括子视图控制器

So you can add a Container View to the UICollectionViewCell . 因此,您可以将容器视图添加到UICollectionViewCell

Worth mentioning is that depending on the implementation you may be violating the rules on how Interstitial ads can be used. 值得一提的是,根据实施方式的不同,您可能会违反有关插页式广告使用方式的规定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM