Chaque fois que je la catégorie ouverte interstitiel semble que je veux faire, il semble une foisComment afficher interstitiel une fois dans l'application ios?
le code
//----------Interstitial Initialization-------------//
-(void)createAndLoadInterstitial
{
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
_interstitial = [[GADInterstitial alloc] initWithAdUnitID:appDelegate.InterstitialAdUnitID];
_interstitial.delegate = self;
[_interstitial loadRequest:[GADRequest request]];
}
- (void)interstitialDidReceiveAd:(GADInterstitial *)interstitial
{
[_interstitial presentFromRootViewController:self];
}
- (void)interstitial:(GADInterstitial *)interstitial didFailToReceiveAdWithError:(GADRequestError *)error
{
NSLog(@"interstitialDidFailToReceiveAdWithError: %@", [error localizedDescription]);
}
- (void)interstitialDidDismissScreen:(GADInterstitial *)interstitial
{
NSLog(@"interstitialDidDismissScreen");
}
vous devez en viewDidLoad initialiser. car GADInterstitial est un objet d'utilisation unique. – KKRocks