开屏广告接入代码
1. 包含头文件
#import <AdHubSDK/AdHubSDK.h>
2. 开屏广告的创建和初始化
_splash = [[AdHubSplash alloc] initWithSpaceID:[DemoIDData sharedInstance].splashSpaceID spaceParam:[DemoIDData sharedInstance].splashSpaceParam];
_splash.delegate = self;
[_splash loadAndDisplayUsingContainerView:splashContainer];
3. 主要属性说明
@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. 代理方法说明
@required
- (UIViewController *)adSplashViewControllerForPresentingModalView;
@optional
- (UIView *)splashSetLogoView;
- (void)splashDidReceiveAd:(AdHubSplash *)ad;
- (void)splash:(AdHubSplash *)ad didFailToLoadAdWithError:(AdHubRequestError *)error;
- (void)splashDidPresentScreen:(AdHubSplash *)ad;
- (void)splashDidClick:(NSString *)landingPageURL;
- (void)splashDidDismissScreen:(AdHubSplash *)ad;