Difference between revisions of "IOS Video"
From AdLocus
Kevinchang (Talk | contribs) (→啟用插頁式版位) |
Kevinchang (Talk | contribs) (→若您需要監聽廣告互動結果) |
||
Line 36: | Line 36: | ||
{ | { | ||
NSLog(@"Receive AdLocus Video Ad."); | NSLog(@"Receive AdLocus Video Ad."); | ||
− | [ | + | [alVideoAdReq show]; |
} | } | ||
Latest revision as of 12:02, 14 October 2014
Contents
前言
影音版位將以曝光次數高分潤,是您提高收益的最好單元之一。
實作
- @interface ViewController : UIViewController <ALInterstitialVideoAdReqDelegate>
- @property (nonatomic, strong) ALInterstitialVideoAdReq *alVideoAdReq;
- - (NSString *)AdLocusAppKey
- @synthesize alVideoAdReq;
- - (void) ALVideoDidReceive:(ALInterstitialVideoAdReq *)req
啟用插頁式版位
在您想啟用影音版位的流程中, 加入下列程式碼
alVideoAdReq= [[ALInterstitialVideoAdReq alloc] initWithViewController:self withDelegate:self]; [alVideoAdReq load];
並透過監聽結果啟用影音插屏
- (void) ALVideoDidReceive:(ALInterstitialVideoAdReq *)req { NSLog(@"Receive AdLocus Video Ad."); [alVideoAdReq show]; }
若您需要監聽廣告互動結果
透過實作 ALInterstitialVideoAdReqDelegate 監測廣告運行結果
- ALVideoDidReceive
- ALVideoDidEnd
- (void) ALVideoDidReceive:(ALInterstitialVideoAdReq *)req { NSLog(@"Receive AdLocus Video Ad."); [alVideoAdReq show]; } - (void) ALVideoDidEnd:(ALInterstitialVideoAdReq *)req { //release Req NSLog(@"End AdLocus Video Ad."); }