激励视频广告接入代码
1. 包含头文件 AdHubSDK.h
2. AdHubRewardBasedVideoAd 的初始化与请求
[AdHubRewardBasedVideoAd sharedInstance].delegate = self;
[[AdHubRewardBasedVideoAd sharedInstance] loadAdWithSpaceID:data.rewardVideoSpaceID spaceParam:data.rewardVideoSpaceParam];
3. AdHubRewardBasedVideoAd 主要属性说明
@property(nonatomic, readonly, copy) NSString *spaceID;
@property(nonatomic, readonly, copy) NSString *spaceParam;
@property(nonatomic, weak) id<AdHubRewardBasedVideoAdDelegate> delegate;
@property(nonatomic, readonly, getter=isReady) BOOL ready;
4. AdHubRewardBasedVideoAd 的展示
- (void)presentFromRootViewController:(UIViewController *)rootViewController;
5. AdHubRewardBasedVideoAdDelegate 的方法说明
@required
- (void)rewardBasedVideoAd:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd
didRewardUserWithReward:(NSObject *)reward;
@optional
- (void)rewardBasedVideoAd:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd
didFailToLoadWithError:(NSError *)error;
- (void)rewardBasedVideoAdDidReceiveAd:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd;
- (void)rewardBasedVideoAdDidOpen:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd;
- (void)rewardBasedVideoAdDidStartPlaying:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd;
- (void)rewardBasedVideoAdDidClose:(AdHubRewardBasedVideoAd *)rewardBasedVideoAd;