commit | author | age
|
96fe76
|
1 |
// |
L |
2 |
// GADAdLoader.h |
|
3 |
// Google Mobile Ads SDK |
|
4 |
// |
|
5 |
// Copyright 2015 Google LLC. All rights reserved. |
|
6 |
// |
|
7 |
|
|
8 |
#import <Foundation/Foundation.h> |
|
9 |
#import <GoogleMobileAds/GADAdLoaderAdTypes.h> |
|
10 |
#import <GoogleMobileAds/GADAdLoaderDelegate.h> |
|
11 |
#import <GoogleMobileAds/GADRequest.h> |
|
12 |
#import <UIKit/UIKit.h> |
|
13 |
|
|
14 |
/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions |
|
15 |
/// subclasses. |
|
16 |
@interface GADAdLoaderOptions : NSObject |
|
17 |
@end |
|
18 |
|
|
19 |
/// Loads ads. See GADAdLoaderAdTypes.h for available ad types. |
|
20 |
@interface GADAdLoader : NSObject |
|
21 |
|
|
22 |
/// Object notified when an ad request succeeds or fails. Must conform to requested ad types' |
|
23 |
/// delegate protocol. This property must be set before initiating ad requests. |
|
24 |
@property(nonatomic, weak, nullable) id<GADAdLoaderDelegate> delegate; |
|
25 |
|
|
26 |
/// The ad loader's ad unit ID. |
|
27 |
@property(nonatomic, readonly, nonnull) NSString *adUnitID; |
|
28 |
|
|
29 |
/// Indicates whether the ad loader is loading. |
|
30 |
@property(nonatomic, getter=isLoading, readonly) BOOL loading; |
|
31 |
|
|
32 |
/// Returns an initialized ad loader configured to load the specified ad types. |
|
33 |
/// |
|
34 |
/// @param rootViewController The root view controller is used to present ad click actions. |
|
35 |
/// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types. |
|
36 |
/// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil |
|
37 |
/// to use default options. See each ad type's header for available GADAdLoaderOptions subclasses. |
|
38 |
- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID |
|
39 |
rootViewController:(nullable UIViewController *)rootViewController |
|
40 |
adTypes:(nonnull NSArray<GADAdLoaderAdType> *)adTypes |
|
41 |
options:(nullable NSArray<GADAdLoaderOptions *> *)options; |
|
42 |
|
|
43 |
/// Loads the ad and informs the delegate of the outcome. |
|
44 |
- (void)loadRequest:(nullable GADRequest *)request; |
|
45 |
|
|
46 |
@end |