开屏广告接入代码
1. 包含头文件 AdHubSDK.h
2. AdHubSplash 的创建和初始化
_splash = [[AdHubSplash alloc] initWithSpaceID:[DemoIDData sharedInstance].splashSpaceID spaceParam:[DemoIDData sharedInstance].splashSpaceParam];
_splash.delegate = self;
[_splash loadAndDisplayUsingContainerView:splashContainer];
3. AdHubSplash 主要属性说明
@property(nonatomic, readonly, copy) NSString *spaceID;
@property(nonatomic, readonly, copy) NSString *spaceParam;
@property(nonatomic, weak) id<AdHubSplashDelegate> delegate;
@property(nonatomic, readonly, assign) BOOL isReady;
4. AdHubSplashDelegate 的方法说明
@required
- (UIViewController *)adSplashViewControllerForPresentingModalView;
@optional
- (void)splashDidReceiveAd:(AdHubSplash *)ad;
- (void)splash:(AdHubSplash *)ad didFailToLoadAdWithError:(AdHubRequestError *)error;
- (void)splashDidPresentScreen:(AdHubSplash *)ad;
- (void)splashDidClick:(NSString *)landingPageURL;
- (void)splashDidDismissScreen:(AdHubSplash *)ad;