123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- //
- // GDTUnifiedBannerView.h
- // GDTMobSDK
- //
- // Created by nimomeng on 2019/3/1.
- // Copyright © 2019 Tencent. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "GDTLoadAdParams.h"
- NS_ASSUME_NONNULL_BEGIN
- @class GDTUnifiedBannerView;
- @protocol GDTUnifiedBannerViewDelegate <NSObject>
- @optional
- /**
- * 请求广告条数据成功后调用
- * 当接收服务器返回的广告数据成功后调用该函数
- */
- - (void)unifiedBannerViewDidLoad:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * 请求广告条数据失败后调用
- * 当接收服务器返回的广告数据失败后调用该函数
- */
- - (void)unifiedBannerViewFailedToLoad:(GDTUnifiedBannerView *)unifiedBannerView error:(NSError *)error;
- /**
- * banner2.0曝光回调
- */
- - (void)unifiedBannerViewWillExpose:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * banner2.0点击回调
- */
- - (void)unifiedBannerViewClicked:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * banner2.0广告点击以后即将弹出全屏广告页
- */
- - (void)unifiedBannerViewWillPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * banner2.0广告点击以后弹出全屏广告页完毕
- */
- - (void)unifiedBannerViewDidPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * 全屏广告页即将被关闭
- */
- - (void)unifiedBannerViewWillDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * 全屏广告页已经被关闭
- */
- - (void)unifiedBannerViewDidDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * 当点击应用下载或者广告调用系统程序打开
- */
- - (void)unifiedBannerViewWillLeaveApplication:(GDTUnifiedBannerView *)unifiedBannerView;
- /**
- * banner2.0被用户关闭时调用
- */
- - (void)unifiedBannerViewWillClose:(GDTUnifiedBannerView *)unifiedBannerView;
- @end
- @interface GDTUnifiedBannerView : UIView
- /**
- * 委托 [可选]
- */
- @property (nonatomic, weak) id<GDTUnifiedBannerViewDelegate> delegate;
- /**
- * Banner展现和轮播时的动画效果开关,默认打开
- */
- @property (nonatomic) BOOL animated;
- /**
- * 广告刷新间隔,范围 [30, 120] 秒,默认值 30 秒。设 0 则不刷新。 [可选]
- */
- @property (nonatomic) int autoSwitchInterval;
- /**
- * QQ小游戏SDK字段透传
- */
- @property (nonatomic, strong) GDTLoadAdParams *loadAdParams;
- /**
- * 构造方法
- * 详解:placementId - 广告位 ID
- * viewController - 视图控制器
- */
- - (instancetype)initWithPlacementId:(NSString *)placementId
- viewController:(UIViewController *)viewController;
- /**
- * 构造方法
- * 详解:frame - banner 展示的位置和大小
- * placementId - 广告位 ID
- * viewController - 视图控制器
- */
- - (instancetype)initWithFrame:(CGRect)frame
- placementId:(NSString *)placementId
- viewController:(UIViewController *)viewController;
- /**
- * 拉取并展示广告
- */
- - (void)loadAdAndShow;
- @end
- NS_ASSUME_NONNULL_END
|