ALAdViewProtocol Protocol Reference
| Declared in | ALAdView.h |
|---|
Overview
This protocol describes a UIView which is capable of loading and showing ads. ALAdView is its sole public concrete implementation.
The functionality of this protocol is exposed via the concrete ALAdView class. To invoke any of its methods, use that; e.g.
ALAdView* adView = [[ALAdView alloc] initWithSize: [ALAdSize sizeBanner]]; [adView loadNextAd];
Ad Delegates
adLoadDelegate
required method
An object conforming to the ALAdLoadDelegate protocol, which, if set, will be notified of ad load events.
@property (strong, atomic, alnullable) id<ALAdLoadDelegate> adLoadDelegateDiscussion
An object conforming to the ALAdLoadDelegate protocol, which, if set, will be notified of ad load events.
Please note: This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this ALAdView.
Declared In
ALAdView.h
adDisplayDelegate
required method
An object conforming to the ALAdDisplayDelegate protocol, which, if set, will be notified of ad show/hide events.
@property (strong, atomic, alnullable) id<ALAdDisplayDelegate> adDisplayDelegateDiscussion
An object conforming to the ALAdDisplayDelegate protocol, which, if set, will be notified of ad show/hide events.
Please note: This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this ALAdView.
Declared In
ALAdView.h
adEventDelegate
required method
An object conforming to the ALAdViewEventDelegate protocol, which, if set, will be notified of ALAdView-specific events.
@property (strong, atomic, alnullable) id<ALAdViewEventDelegate> adEventDelegateDiscussion
An object conforming to the ALAdViewEventDelegate protocol, which, if set, will be notified of ALAdView-specific events.
Please note: This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this ALAdView.
Declared In
ALAdView.h
Ad View Configuration
adSize
required method
zoneIdentifier
required method
autoload
required method
Whether or not this ALAdView should automatically load and rotate banners.
@property (assign, atomic, getter=isAutoloadEnabled, setter=setAutoloadEnabled:) BOOL autoloadDiscussion
Whether or not this ALAdView should automatically load and rotate banners.
If YES, ads will be automatically loaded and updated. If NO, you are reponsible for this behavior via [ALAdView loadNextAd]. Defaults to YES.
Declared In
ALAdView.h
Loading and Rendering Ads
– loadNextAd
required method
Start loading a new advertisement. This method will return immediately. An advertisement will be rendered by this view asynchonously when available.
- (void)loadNextAdDiscussion
Start loading a new advertisement. This method will return immediately. An advertisement will be rendered by this view asynchonously when available.
Declared In
ALAdView.h
– render:
required method
Render a specific ad that was loaded via ALAdService.
- (void)render:(ALAd *)adParameters
ad |
Ad to render. Must not be nil. |
|---|
Discussion
Render a specific ad that was loaded via ALAdService.
Declared In
ALAdView.h
Initialization
– initWithSize:
required method
Initialize the ad view with a given size.
- (instancetype)initWithSize:(ALAdSize *)sizeParameters
size |
ALAdSize representing the size of this ad. For example, [ALAdSize sizeBanner]. |
|---|
Return Value
A new instance of ALAdView.
Discussion
Initialize the ad view with a given size.
Declared In
ALAdView.h
– initWithSize:zoneIdentifier:
required method
Initialize the ad view for a given size and zone.
- (instancetype)initWithSize:(ALAdSize *)size zoneIdentifier:(alnullable NSString *)zoneIdentifierParameters
size |
ALAdSize representing the size of this ad. For example, [ALAdSize sizeBanner]. |
|---|---|
zoneIdentifier |
Identifier for the zone this ALAdView should load ads for. |
Return Value
A new instance of ALAdView.
Discussion
Initialize the ad view for a given size and zone.
Declared In
ALAdView.h
– initWithSdk:size:
required method
Initialize the ad view with a given size.
- (instancetype)initWithSdk:(ALSdk *)sdk size:(ALAdSize *)sizeParameters
sdk |
Instance of ALSdk to use. |
|---|---|
size |
ALAdSize representing the size of this ad. For example, [ALAdSize sizeBanner]. |
Return Value
A new instance of ALAdView.
Discussion
Initialize the ad view with a given size.
Declared In
ALAdView.h
– initWithFrame:size:sdk:
required method
Initialize ad view with a given frame, ad size, and ALSdk instance.
- (instancetype)initWithFrame:(CGRect)frame size:(ALAdSize *)size sdk:(ALSdk *)sdkParameters
frame |
Frame to use. |
|---|---|
size |
Ad size to use. |
sdk |
Instance of ALSdk to use. |
Return Value
A new instance of ALAdView.
Discussion
Initialize ad view with a given frame, ad size, and ALSdk instance.
Declared In
ALAdView.h