自定义广告接入代码
1. 包含头文件 AdHubSDK.h
2. AdHubCustomView 的创建和初始化
self.custom = [[AdHubCustomView alloc] initWithSpaceID:[DemoIDData sharedInstance].customSpaceID spaceParam:[DemoIDData sharedInstance].customSpaceParam];
self.custom.frame = CGRectZero;
self.custom.delegate = self;
[self.custom loadAd];
3. AdHubCustomView 主要属性说明
@property(nonatomic, readonly, copy) NSString *spaceID;
@property(nonatomic, readonly, copy) NSString *spaceParam;
@property(nonatomic, weak) id<AdHubCustomViewDelegate> delegate;
4. AdHubCustomViewDelegate 的方法说明
@required
- (UIViewController *)adCustomViewControllerForPresentingModalView;
@optional
- (void)adCustomViewDidReceiveAd:(AdHubCustomView *)customView;
- (void)adCustomView:(AdHubCustomView *)customView didFailToReceiveAdWithError:(AdHubRequestError *)error;
- (void)adCustomViewDidDismissScreen:(AdHubCustomView *)customView;
- (void)customDidClick:(NSString *)landingPageURL;