iOS 7 iAd插页式广告无法由用户关闭 [英] iOS 7 iAd interstitial ads can not be closed by user

查看:136
本文介绍了iOS 7 iAd插页式广告无法由用户关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我显示插页式广告

[interstitial presentFromViewController:self];

我收到警告,在iOS 7中不推荐使用此方法。但它仍能正常工作!

i get the warning that this method is deprecated in iOS 7. But it still works fine!

当我显示广告视图时

[self requestInterstitialAdPresentation];
[interstitial presentInView:self.view]; 

我没有收到警告且广告正在加载,但广告中没有(X)用户可以关闭广告。

i get no warning and the ad is loading but there is no (X) in the ad that the user can close the ad.

有人知道如何解决这个问题吗?

Do somebody knows how to fix this?

推荐答案

嘿那里这是麻烦制造者
[interstitial presentInView:self.view];
而不是尝试这个(委托方法)t应该被删除manualy

hey there this is the troublemaker [interstitial presentInView:self.view]; instead try this (delegate methods) t'should be removed manualy

-(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的错误。我不确定它可能是苹果所需的功能,没有关于此的文档。至少我没有看到任何。请分享,如果你发现这方面的官方。

I have the same bug Use the old API or put custom x button .I thinks this is a bug from presentinView . i am not sure it could be apple desired feature there's no documentation on this.At least i haven't seen any.Please share if you find something official on this.

这篇关于iOS 7 iAd插页式广告无法由用户关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆