4

タブビュー ベースの 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!

私の現在のView Controllerは何かを提示しているようなので、それが何であるかを確認して閉じます。

            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!

誰かが理由を知っていますか?ティア!

4

1 に答える 1

0
- (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];
}

選択値を保存します

于 2014-10-12T20:58:36.200 に答える