0
我設置了一個按鈕,可以在按下時顯示插頁式廣告。Admob插頁式廣告沒有顯示
這是我的代碼:
-Declaration
var AdsInterstitial:GADInterstitial!
- 查看做負載
AdsInterstitial = GADInterstitial(adUnitID: "Id sample number")
let request = GADRequest()
AdsInterstitial.loadRequest(request)
- 按鈕按下
AdsInterstitial.presentFromRootViewController(self)
AdsInterstitial = NewInterstitial()
- 功能生成新的廣告
func NewInterstitial() -> GADInterstitial{
let AdsInterstitial = GADInterstitial(adUnitID: "Id sample number")
AdsInterstitial.loadRequest(GADRequest())
return AdsInterstitial
}
當我點擊按鈕,我得到這個錯誤:「能不存在間隙。它沒有準備好。「
你能幫助我嗎?