【问题标题】:admob interstitial presentFromRootViewController does not show adadmob 插页式 presentFromRootViewController 不显示广告
【发布时间】:2013-10-21 05:10:04
【问题描述】:

我有一个基于标签视图的 iOS 应用,我想使用 AdMob GADInterstitial。

        if (gadFullReady) { //this check if GAD interstitial received ad
            NSLog(@"from GAD");
            [gadFull presentFromRootViewController:self];
        }

没有出现 AdMob 插页式广告,我收到如下错误消息:

        Warning: Attempt to present <GADWebAppViewController: 0x9965bd0> on <UITabBarController: 0xb24ab00> while a presentation is in progress!

似乎我当前的视图控制器正在呈现一些东西,所以我去检查它是什么并关闭它。

            NSLog(@"above view %@", [[self presentedViewController] description]);
            UIViewController *currVC = [self presentedViewController];
            [currVC dismissViewControllerAnimated:NO completion:^(){
                [gadFull presentFromRootViewController:self];
            }];

这次我收到了错误消息:

       above view <UINavigationController: 0x99cbbe0>
       Warning: Attempt to dismiss from view controller <UITabBarController: 0x9992890> while a presentation or dismiss is in progress!

有人知道为什么吗?蒂亚!

【问题讨论】:

    标签: ios admob presentation interstitial


    【解决方案1】:
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        _iSel=0;
        self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0f) self.tableView.tintColor = kIHLightColor;
        [self.tableView setContentOffset:CGPointMake(0, -20)];
        [self.tableView setContentInset:UIEdgeInsetsMake(20, 0, 0, 0)];
    
        self.tableView.backgroundColor = kIHMenuCellBackgroundColor;
    }
    
    - (void)viewWillAppear:(BOOL)animated
    {
        [super viewWillAppear:animated];
        [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:_iSel inSection:0]
                                    animated:NO
                              scrollPosition:UITableViewScrollPositionNone];
    }
    

    保存选择值

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多