IOS Admob中间层打开按钮单击?
第四次单击后,Interstitual仅显示一次。有人可以这样做,以显示例如在每一次点击我想(在第10次点击,在第20次点击…) 删除条件 请在应用程序启动时获取此方法,然后您可以在任何地方多次设置以下方法:IOS Admob中间层打开按钮单击?,ios,admob,ads,interstitial,Ios,Admob,Ads,Interstitial,第四次单击后,Interstitual仅显示一次。有人可以这样做,以显示例如在每一次点击我想(在第10次点击,在第20次点击…) 删除条件 请在应用程序启动时获取此方法,然后您可以在任何地方多次设置以下方法: AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; if ([appDelegate.interstitial isReady]) { [appDelegate.
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if ([appDelegate.interstitial isReady]) {
[appDelegate.interstitial presentFromRootViewController:self];
}
在退出
Interstival
后,您必须为下一次创建一个新的Interstival
。谢谢,但您能否编写示例代码,说明如何在单击后显示Interstival click(例如,当我第4次、第6次、第20次单击时)。单击按钮时显示Interstival ok,但我想在点击后显示,例如,当我点击它的第4次,第6次,第20次。。。
if ([self.interstitial isReady]) {
[self.interstitial presentFromRootViewController:self];
}
- (GADInterstitial *)createAndLoadInterstitial
{
GADInterstitial *interstitial = [[GADInterstitial alloc] init];
interstitial.adUnitID = @"ca-app-pub-yourAdId";
interstitial.delegate = self;
[interstitial loadRequest:[GADRequest request]];
return interstitial;
}
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
if ([appDelegate.interstitial isReady]) {
[appDelegate.interstitial presentFromRootViewController:self];
}