You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.7 KiB
55 lines
1.7 KiB
4 years ago
|
//
|
||
|
// TFAdvertisementBasicView.h
|
||
|
// TFReader
|
||
|
//
|
||
|
// Created by 谢腾飞 on 2020/12/23.
|
||
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import <UIKit/UIKit.h>
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
/*** 广告类型 ***/
|
||
|
typedef NS_ENUM(NSUInteger, TFAdvertisementType) {
|
||
|
TFAdvertisementTypeNone = 0, /*** 列表广告 ***/
|
||
|
TFAdvertisementTypeNovel = 1, /*** 小说广告 ***/
|
||
|
TFAdvertisementTypeComic = 2, /*** 漫画广告 ***/
|
||
|
};
|
||
|
|
||
|
/*** 广告位置 ***/
|
||
|
typedef NS_ENUM(NSUInteger, TFAdvertisementPosition) {
|
||
|
TFAdvertisementPositionNone = 0, /*** 列表广告 ***/
|
||
|
TFAdvertisementPositionEnd = 8, /*** 阅读器章节末尾广告 ***/
|
||
|
TFAdvertisementPositionBottom = 12, /*** 阅读器底部广告 ***/
|
||
|
TFAdvertisementPositionVideo = 13, /*** 激励视频广告 ***/
|
||
|
};
|
||
|
|
||
|
@interface TFAdvertisementBasicView : UIView
|
||
|
|
||
|
@property (nonatomic ,strong) TFAdvertModel *advertModel;
|
||
|
@property (nonatomic ,assign) TFAdvertisementPosition position;
|
||
|
@property (nonatomic ,assign) TFAdvertisementType type;
|
||
|
|
||
|
- (instancetype)initWithFrame:(CGRect)frame advertisementType:(TFAdvertisementType)type advertisementPosition:(TFAdvertisementPosition)position;
|
||
|
|
||
|
+ (instancetype)allocWithZone:(struct _NSZone *)zone UNAVAILABLE_ATTRIBUTE;
|
||
|
|
||
|
+ (instancetype)new UNAVAILABLE_ATTRIBUTE;
|
||
|
|
||
|
- (instancetype)init UNAVAILABLE_ATTRIBUTE;
|
||
|
|
||
|
- (instancetype)initWithFrame:(CGRect)frame UNAVAILABLE_ATTRIBUTE;
|
||
|
|
||
|
- (void)createSubviews;
|
||
|
|
||
|
// 广告点击
|
||
|
- (void)clickAd;
|
||
|
|
||
|
// 请求指定广告信息
|
||
|
- (void)requestAdvertisementWithType:(TFAdvertisementType)type advertisementPostion:(TFAdvertisementPosition)position complete:(void(^)(TFAdvertModel * _Nullable advertModel, NSString *msg))complete;
|
||
|
|
||
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|