forked from saberma/BrainShot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdMobView.h
51 lines (44 loc) · 1.71 KB
/
AdMobView.h
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
44
45
46
47
48
49
50
51
/**
* AdMobView.h
* AdMob iPhone SDK publisher code.
*
* The entry point for requesting a 320x48 AdMob ad to display.
*/
#import <UIKit/UIKit.h>
@protocol AdMobDelegate;
@interface AdMobView : UIView
/**
* Initiates an ad request and returns a view that will contain the results;
* the delegate is alerted when the ad is ready to display (or has failed to
* load); this is a good opportunity to attach the view to your hierarchy.
* If you already have a AdMobView with an ad loaded, and simply want to show
* a new ad in the same location, you may use -requestFreshAd instead (see below).
*
* This method should only be called from a run loop in default run loop mode.
* If you don't know what that means, you're probably ok. If in doubt, check
* whether ([[NSRunLoop currentRunLoop] currentMode] == NSDefaultRunLoopMode).
*/
+ (AdMobView *)requestAdWithDelegate:(id<AdMobDelegate>)delegate;
/**
* Causes an existing AdMobView to display a fresh ad. If an ad successfully loads,
* it is animated in with a flip; if not, this call fails silently and the old
* ad remains onscreen.
*
* Note that, during the flip, views under the AdMobView will be exposed.
*
* If refreshing an ad, we recommend doing it no more frequently than every 12
* seconds. The click through rates of ads remain high for that amount of time
* and it gives users a chance to read and comprehend the ad.
*/
- (void)requestFreshAd;
/**
* Returns the version of the current SDK.
*/
+ (NSString *)version;
/**
* This property is exposed so that the delegate can be cleared if it is going to
* be dealloc'ed. This ensures that the AdMob SDK will never make a call to a
* deallocated instance.
*/
@property (assign) id<AdMobDelegate> delegate;
@end