我想在故事板中的viewControllers之间执行segue后立即显示插页式广告(来自iAd框架)。
我尝试启动[interstitial presentInView:view]
(如Apple文档中所述),但广告未显示。
任何帮助?
答案 0 :(得分:1)
最后,我设法解决了我的疑问。
- (void) showFullScreenAd {
if (requestingAd == NO) {
interstitial = [[ADInterstitialAd alloc] init];
interstitial.delegate = self;
self.interstitialPresentationPolicy = ADInterstitialPresentationPolicyManual;
[self requestInterstitialAdPresentation];
NSLog(@"interstitialAdREQUEST");
requestingAd = YES;
}
}
-(void) interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd{
NSLog(@"interstitialAd DidLOAD");
if (interstitialAd != nil && interstitial != nil && requestingAd == YES) {
NSLog(@"interstitialDidPRESENT");
[interstitial presentFromViewController:self];
}
}