Banner广告接入代码
1. 包含头文件
#import <AdHubSDK/AdHubSDK.h>
2. 横幅广告的创建和初始化
self.banner = [[AdHubBannerView alloc] initWithSpaceID:[DemoIDData sharedInstance].bannerSpaceID spaceParam:[DemoIDData sharedInstance].bannerSpaceParam];
self.banner.delegate = self;
[self.banner loadAd];
3. 主要属性说明
@property(nonatomic, readonly, copy) NSString *spaceID;
@property(nonatomic, readonly, copy) NSString *spaceParam;
@property(nonatomic, weak) id<AdHubBannerViewDelegate> delegate;
4. 代理方法说明
@required
- (UIViewController *)adBannerViewControllerForPresentingModalView;
@optional
- (void)adViewDidReceiveAd:(AdHubBannerView *)bannerView;
- (void)adView:(AdHubBannerView *)bannerView didFailToReceiveAdWithError:(AdHubRequestError *)error;
- (void)adViewWillPresentScreen:(AdHubBannerView *)bannerView;
- (void)adViewClicked:(NSString *)landingPageURL;
- (void)adViewDidDismissScreen:(AdHubBannerView *)bannerView;