我需要在游戏结束时展示广告。我不确定每次我想要的时候是否应该调用loadEd()或者当admob被邀请时才调用一次? 有人可以帮我这个吗? THX
答案 0 :(得分:0)
-(void)loadFullScreen
{
AdmobFullScreen=[[GADInterstitial alloc] init];
AdmobFullScreen.delegate=self;
AdmobFullScreen.adUnitID=@"YourID";
[AdmobFullScreen loadRequest:[GADRequest request]];
}
-(void)interstitialDidReceiveAd:(GADInterstitial *)ad
{
[AdmobFullScreen presentFromRootViewController:self];
}
-(void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error
{
NSLog(@"error %@",error);
}
这样在需要全屏浏览时只需调用上面的方法
的更多信息