加载AdMobs插页式广告后,请查看其他视图

时间:2016-02-13 14:45:32

标签: swift admob segue interstitial

我试图在从1个ViewController到另一个ViewController之间加载插页式广告。当按下引入segue的按钮时,会显示插页式广告。用户现在可以点击X按钮使其消失但不幸的是用户返回到插页式广告出现之前最初的屏幕。我做错了什么?

@IBAction func segueHome(sender: AnyObject) {
    if self.interstitial.isReady {
        if (advertisement == true){
            print("true");
            dispatch_async(dispatch_get_main_queue(), {
                self.interstitial.presentFromRootViewController(self)
                self.performSegueWithIdentifier("presentHome", sender: self);
            });
        }
    } else {
        dispatch_async(dispatch_get_main_queue(), {
            self.performSegueWithIdentifier("presentHome", sender: self);
        });
    }
} 

0 个答案:

没有答案