TDAdLoader Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | TDAdLoader.h |
Overview
TDAdLoader loads a Triton ad from an ad request.
The ad returned is represented by a TDAd object and contains all the information needed to display and manage an ad. The ad returned can be presented using custom application UI or it can be passed directly to TDBannerView or TDInterstitialAd for display.
Creating a TDAdLoader
– loadAdWithStringRequest:completionHandler:
Loads an ad asynchronously from a request string. The string can be built manually by following Triton Digital On-Demand advertising guide or by the help of TDAdRequestURLBuilder class (recommended).
- (void)loadAdWithStringRequest:(NSString *)request completionHandler:(void ( ^ ) ( TDAd *loadedAd , NSError *error ))completionHandlerParameters
request |
A NSString containing the request with the targeting parameters. |
|---|---|
completionHandler |
a block that will execute when the request is finished, with the ad loaded or an error object. |
Declared In
TDAdLoader.h
– loadAdWithBuilder:completionHandler:
Loads an ad asynchronously directly from a TDAdRequestURLBuilder.
- (void)loadAdWithBuilder:(TDAdRequestURLBuilder *)builder completionHandler:(void ( ^ ) ( TDAd *loadedAd , NSError *error ))completionHandlerParameters
builder |
A TDAdRequestURLBuilder containing the request with the targeting parameters. |
|---|---|
completionHandler |
a block that will execute when the request is finished, with the ad loaded or an error object. |
Declared In
TDAdLoader.h