TDInterstitialAd Class Reference

Inherits from NSObject
Declared in TDInterstitialAd.h

Overview

The TDInterstitialAd class is used to request and display Triton interstitial ads.

Interstitial ads, like pre-rolls and mid-rolls, are full screen ads displayed in natural transition points of the app. I.e. Playing a video ad before the user start to listen to a station. Audio and video interstitials are supported. It’s recommended to preload the ad long before it is displayed.

Managing the delegate

  delegate

The delegate that will receive state changes from TDInterstitialAd.

@property (nonatomic, weak) id<TDInterstitialDelegate> delegate

Declared In

TDInterstitialAd.h

Loading an interstitial ad

  loaded

Informs if the ad was loaded from Triton’s server. This property should be checked before presenting the interstitial ad.

@property (nonatomic, readonly) BOOL loaded

Declared In

TDInterstitialAd.h

Ad Countdown Timer

  enableCountdownDisplay

Display the ad countdown timer if true

@property (nonatomic, assign) BOOL enableCountdownDisplay

Declared In

TDInterstitialAd.h

– loadAd:

Prepare an interstitial ad for playing. It will be prefetched if needed.

- (void)loadAd:(TDAd *)ad

Parameters

ad

The TDAd to be loaded.

Declared In

TDInterstitialAd.h

– loadRequestBuilder:

Request and prepare an interstitial ad for playing. It will be prefetched if needed.

- (void)loadRequestBuilder:(TDAdRequestURLBuilder *)requestBuilder

Parameters

requestBuilder

A TDAdRequestURLBuilder object representing the interstitial request.

Declared In

TDInterstitialAd.h

– loadStringRequest:

Request and prepare an interstitial ad for playing. It will be prefetched if needed.

- (void)loadStringRequest:(NSString *)stringRequest

Parameters

stringRequest

A NSString representing the interstitial request. It can be build manually or by TDAdRequestURLBuilder.

Declared In

TDInterstitialAd.h

Presenting an Interstitial ad

– presentFromViewController:

Presents the interstitial ad which takes over the entire screen until it finishes or the user dismisses it. This method only has effect if loaded returns YES and/or if the delegate’s interstitialDidReceiveAd: has been called.

- (void)presentFromViewController:(UIViewController *)rootViewController

Parameters

rootViewController

The current view controller which will be used to present the full screen ad.

Declared In

TDInterstitialAd.h