当我显示插页式广告时
[interstitial presentFromViewController:self];
我收到警告说此方法在 iOS 7 中已弃用。但它仍然可以正常工作!
当我显示广告视图时
[self requestInterstitialAdPresentation];
[interstitial presentInView:self.view];
我没有收到任何警告,广告正在加载,但广告中没有 (X) 表明用户可以关闭广告。
有人知道如何解决这个问题吗?
嘿,这是麻烦制造者
[插页式presentInView:self.view];
相反,尝试这个(委托方法),应该手动删除
-(void)interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd{
if (interstitial != nil){
_adPlaceholderView = [[UIView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:_adPlaceholderView];
[interstitial presentInView:_adPlaceholderView];
}
and on did unload
- (void)interstitialAdDidUnload:(ADInterstitialAd *)interstitialAd
{
NSLog(@"ad has been unloaded");
[_adPlaceholderView removeFromSuperview];
_adPlaceholderView = nil;
}
我有同样的错误使用旧的API或放置自定义x按钮。我认为这是来自presentinView的错误。我不确定这可能是苹果想要的功能,没有关于此的文档。至少我还没有看到任何文档。如果您找到有关此的官方内容,请分享。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)