的GADInterstitial定製廣告我已經得到的GADInterstitial定製廣告一個問題,我已經嘗試了本代碼沒有工作
if(nil != m_pBannerView)
{
m_pBannerView.delegate = nil;
[m_pBannerView release];
m_pBannerView = nil;
}
m_pBannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
m_pBannerView.delegate = self;
m_pBannerView.rootViewController = self;
m_pBannerView.adUnitID = @"AdMob Publisher ID";
m_pBannerView.rootViewController = self;
[self.view addSubview:m_pBannerView];
GADRequest *request = [GADRequest request];
request.testing = YES;
[m_pBannerView loadRequest:request];
if(nil != m_pInterstitial)
{
[m_pInterstitial release];
m_pInterstitial = nil;
}
m_pInterstitial = [[GADInterstitial alloc] init];
m_pInterstitial.delegate = self;
m_pInterstitial.adUnitID = @"INTERSTITIAL_AD_UNIT_ID";
GADRequest *interstialRequest = [GADRequest request];
interstialRequest.testing = YES;
[m_pInterstitial loadRequest: interstialRequest];
} 而在代表們的GADInterstitial我打電話[廣告presentFromRootViewController:自我]。
但我仍然無法獲得定製廣告,請幫助我。
我有同樣的問題,使用loadAndDisplayRequest:usingWindow:initialImage:描述[這裏](https://developers.google.com/mobile-ads-sdk/docs/ios/advanced) – thomers 2012-07-20 12:48:15