当我使用显示间隙广告时
[interstitial presentFromViewController:self];
我得到的警告是,这个方法在iOS 7中被弃用了,但它仍然工作得很好!
显示广告视图时
[self requestInterstitialAdPresentation];
[interstitial presentInView:self.view]; 我没有得到任何警告,广告正在加载,但在广告中没有用户可以关闭广告的(X)。
有人知道怎么解决这个问题吗?
发布于 2014-10-25 19:11:11
嘿,这是麻烦制造者的中间方法;而不是尝试这个(委托方法),应该手动删除t‘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;
}我有同样的bug,使用旧的API或者放入自定义的x按钮,.I认为这是来自presentinView的bug。我不确定这是不是苹果想要的功能,没有关于this.At的文档,至少我还没有看过any.Please分享,如果你在这上面找到一些官方的东西的话。
https://stackoverflow.com/questions/22126107
复制相似问题