[英]How to delete an interstitial iAd
I am implementing interstitial iAds into my project. 我正在我的项目中实施插页式广告。 After each game, I attempt to show an interstitial ad. 每次游戏结束后,我都会尝试展示插页式广告。 However, in my testing, I get an error saying that there are too many interstitial ads after about 10 games. 但是,在测试中,我收到一个错误消息,说在大约10个游戏之后插页式广告过多。 How do I delete these instances of interstitial ads? 如何删除插页式广告的这些实例?
Code: 码:
if requestingAd == false {
showInterstitialAds = true
self.interstitialAd.delegate = self
self.interstitialPresentationPolicy = ADInterstitialPresentationPolicy.Automatic
println("Loading Ad")
requestingAd = true
}
Also, I am attempting to show an interstitial ad after each play of my game. 另外,我尝试在每次游戏后显示插页式广告。 However, sometimes an ad is not shown and I believe this is normal because the ad inventory might not always be available. 但是,有时没有显示广告,我认为这很正常,因为广告库存可能并不总是可用。 As a result, the game often ends without showing an ad. 结果,游戏通常在没有显示广告的情况下结束。
Is there a way that I can detect if an interstitial ad will not be shown so that I can use a banner ad instead? 有没有一种方法可以检测是否不会显示插页式广告,从而可以使用横幅广告?
You can't delete interstitial but you can cancel it before showing next interstitial using this method 您无法删除插页式广告,但是可以在使用此方法显示下一个插页式广告之前将其删除
[interstitial cancelAction]; [interstitial cancelAction];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.