1

我想将 GADInterstitial 添加到我的 iOS 游戏中,所以每次应用程序激活时,我都想呈现有趣的内容。在我的 AppDelegate.m 中,在方法 applicationDidBecomeActive: 我调用我的方法

-(void)splashInterstitial{
interestitial = [[GADInterstitial alloc] init];
interestitial.adUnitID = ADMOB_ID;
interestitial.delegate = self;
[interestitial loadAndDisplayRequest:[self createRequest] usingWindow:self.window   initialImage:nil];

}

但是每次我关闭广告时都会收到警告:

attempt to dismiss modal view controller whose view does not currently appear. self = <GADInterstitialAppController: 0x5d3ed0> modalViewController = <GADWebAppViewController: 0x5d1ca0>

有人收到这个警告吗?

4

1 回答 1

0

我找到了解决方案。总是检查你的初始化和横幅的可视化之后

viewDidAppear

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    hasLoaded = YES;
    [self splashInterstitial];
}
于 2014-05-02T16:35:27.527 回答