Difference between revisions of "IOS Interstitial"
From AdLocus
(Created page with "== 前言 == 插頁式版位將以曝光次數高分潤,是您提高收益的最好單元之一。 == 實作 == * @interface ViewController : UIViewController <ALInterstit...") |
Kevinchang (Talk | contribs) (→實作) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
* @interface ViewController : UIViewController <ALInterstitialDelegate> | * @interface ViewController : UIViewController <ALInterstitialDelegate> | ||
* @property (nonatomic, strong) ALInterstitial *alInterstitialAd; | * @property (nonatomic, strong) ALInterstitial *alInterstitialAd; | ||
− | * - (NSString *)AdLocusAppKey | + | * - (NSString *)AdLocusAppKey; |
== 啟用插頁式版位 == | == 啟用插頁式版位 == |
Latest revision as of 18:10, 16 July 2015
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); }