Difference between revisions of "IOS Interstitial"
From AdLocus
Line 1: | Line 1: | ||
− | |||
== 前言 == | == 前言 == | ||
插頁式版位將以曝光次數高分潤,是您提高收益的最好單元之一。 | 插頁式版位將以曝光次數高分潤,是您提高收益的最好單元之一。 | ||
Line 35: | Line 34: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− |
Revision as of 17:43, 13 October 2014
Contents
前言
插頁式版位將以曝光次數高分潤,是您提高收益的最好單元之一。
實作
- @interface ViewController : UIViewController <ALInterstitialDelegate>
- @property (nonatomic, strong) ALInterstitial *alInterstitialAd;
- - (NSString *)AdLocusAppKey
啟用插頁式版位
在您想啟用插頁式版位的流程中中加入下列程式碼
self.alInterstitialAd = [[ALInterstitial alloc] init]; self.alInterstitialAd.delegate = self; [self.alInterstitialAd setInterstitialAnimationType:AdLocusInterstitialAnimationTypeFadeIn]; [self.alInterstitialAd requestAdViewWithDelegate:self]; [self.view addSubview:self.alInterstitialAd];
若您需要監聽廣告互動結果
透過實作 ALInterstitialDelegate 監測廣告運行結果
- interstitialDidReceiveAd
- interstitialDidFailToReceiveAd
- (void)interstitialDidReceiveAd:(ALInterstitial *)interstitial { NSLog(@"Receive AdLocus interstitial Ad."); } - (void)interstitialDidFailToReceiveAd:(ALInterstitial *)interstitial andError:(HyxenAdLocusError *)error { NSLog(@"Failed to receive AdLocus interstitial Ad : %@", error); }