插屏广告接入代码
1. 包含头文件
#import <AdHubSDK/AdHubSDK.h>
2. 插屏广告的创建和初始化
self.interstitial = [[AdHubInterstitial alloc] initWithSpaceID:[DemoIDData sharedInstance].interstitialSpaceID spaceParam:[DemoIDData sharedInstance].interstitialSpaceParam];
self.interstitial.delegate = self;
[self.interstitial loadAd];
3. 主要属性说明
@property(nonatomic, readonly, copy) NSString *spaceID;
@property(nonatomic, readonly, copy) NSString *spaceParam;
@property(nonatomic,assign)BOOL needAnimation;
@property(nonatomic, weak) id<AdHubInterstitialDelegate> delegate;
4. 插屏展现方法
- (void)presentFromRootViewController:(UIViewController *)rootViewController;
5. 代理方法说明
@optional
- (void)interstitialDidReceiveAd:(AdHubInterstitial *)ad;
- (void)interstitial:(AdHubInterstitial *)ad didFailToReceiveAdWithError:(AdHubRequestError *)error;
- (void)interstitialDidPresentScreen:(AdHubInterstitial *)ad;
- (void)interstitialDidClick:(NSString *)landingPageURL;
- (void)interstitialDidDismissScreen:(AdHubInterstitial *)ad;