KSNativeAdsManager.h
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// KSNativeAdsManager.h
// KSAdSDK
//
// Created by 徐志军 on 2019/10/11.
// Copyright © 2019 KuaiShou. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "KSNativeAd.h"
NS_ASSUME_NONNULL_BEGIN
@protocol KSNativeAdsManagerDelegate;
@interface KSNativeAdsManager : NSObject
@property (nonatomic, strong, nullable) NSArray<KSNativeAd *> *data;
/// The delegate for receiving state change messages such as requests succeeding/failing.
@property (nonatomic, weak, nullable) id<KSNativeAdsManagerDelegate> delegate;
- (id)initWithPosId:(NSString *)posId;
/**
It is recommended to request no more than 5 ads.
If more than 5 ads, it will return 1.
*/
- (void)loadAdDataWithCount:(NSInteger)count;
@end
@protocol KSNativeAdsManagerDelegate <NSObject>
@optional
- (void)nativeAdsManagerSuccessToLoad:(KSNativeAdsManager *)adsManager nativeAds:(NSArray<KSNativeAd *> *_Nullable)nativeAdDataArray;
- (void)nativeAdsManager:(KSNativeAdsManager *)adsManager didFailWithError:(NSError *_Nullable)error;
@end
NS_ASSUME_NONNULL_END