ALAdView Class Reference

Inherits from UIView
Declared in ALAdView.h

Overview

This class represents a view-based ad - i.e. banner, mrec or leader.

Ad Delegates

  adLoadDelegate

An object conforming to the ALAdLoadDelegate protocol, which, if set, will be notified of ad load events.

@property (nonatomic, strong, nullable) IBOutlet id<ALAdLoadDelegate> adLoadDelegate

Discussion

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

An object conforming to the ALAdDisplayDelegate protocol, which, if set, will be notified of ad show/hide events.

@property (nonatomic, strong, nullable) IBOutlet id<ALAdDisplayDelegate> adDisplayDelegate

Discussion

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

An object conforming to the ALAdViewEventDelegate protocol, which, if set, will be notified of ALAdView-specific events.

@property (nonatomic, strong, nullable) IBOutlet id<ALAdViewEventDelegate> adEventDelegate

Discussion

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

The size of ads to be loaded within this ALAdView.

@property (nonatomic, strong) ALAdSize *adSize

Discussion

The size of ads to be loaded within this ALAdView.

Declared In

ALAdView.h

  zoneIdentifier

The zone identifier this ALAdView was initialized with and is loading ads for, if any.

@property (nonatomic, copy, readonly, nullable) NSString *zoneIdentifier

Discussion

The zone identifier this ALAdView was initialized with and is loading ads for, if any.

Declared In

ALAdView.h

  autoload

Whether or not this ALAdView should automatically load and rotate banners.

@property (nonatomic, assign, getter=isAutoloadEnabled, setter=setAutoloadEnabled:) BOOL autoload

Discussion

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

Loads AND displays an ad into the view. This method will return immediately.

- (void)loadNextAd

Discussion

Loads AND displays an ad into the view. This method will return immediately.

Please note: To load ad but not display it, use [[ALSdk shared].adService loadNextAd: ... andNotify: ...] then [adView renderAd: ...] to render it.

Declared In

ALAdView.h

– render:

Render a specific ad that was loaded via ALAdService.

- (void)render:(ALAd *)ad

Parameters

ad

Ad to render. Must not be nil.

Discussion

Render a specific ad that was loaded via ALAdService.

Declared In

ALAdView.h

Initialization

– initWithSize:

Initialize the ad view with a given size.

- (instancetype)initWithSize:(ALAdSize *)size

Parameters

size

ALAdSize representing the size of this ad. For example, ALAdSize.banner.

Return Value

A new instance of ALAdView.

Discussion

Initialize the ad view with a given size.

Declared In

ALAdView.h

– initWithSize:zoneIdentifier:

Initialize the ad view for a given size and zone.

- (instancetype)initWithSize:(ALAdSize *)size zoneIdentifier:(nullable NSString *)zoneIdentifier

Parameters

size

ALAdSize representing the size of this ad. For example, ALAdSize.banner.

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:

Initialize the ad view with a given sdk and size.

- (instancetype)initWithSdk:(ALSdk *)sdk size:(ALAdSize *)size

Parameters

sdk

Instance of ALSdk to use.

size

ALAdSize representing the size of this ad. For example, ALAdSize.banner.

Return Value

A new instance of ALAdView.

Discussion

Initialize the ad view with a given sdk and size.

Declared In

ALAdView.h

– initWithSdk:size:zoneIdentifier:

Initialize the ad view with a given sdk, size, and zone.

- (instancetype)initWithSdk:(ALSdk *)sdk size:(ALAdSize *)size zoneIdentifier:(nullable NSString *)zoneIdentifier

Parameters

sdk

Instance of ALSdk to use.

size

ALAdSize representing the size of this ad. For example, ALAdSize.banner.

zoneIdentifier

Identifier for the zone this ALAdView should load ads for.

Return Value

A new instance of ALAdView.

Discussion

Initialize the ad view with a given sdk, size, and zone.

Declared In

ALAdView.h

– initWithFrame:size:sdk:

Initialize ad view with a given frame, ad size, and ALSdk instance.

- (instancetype)initWithFrame:(CGRect)frame size:(ALAdSize *)size sdk:(ALSdk *)sdk

Parameters

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