TDAd Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | TDAd.h |
Overview
TDAd represents a Triton ad in the SDK. It contains information about all supported ads (in-stream/on-demand, audio/banner/video).
Usually TDAd is used as an output of TDAdLoader and as input of TDBannerView and TDInterstitialAd and its details don’t need to be known. However, when the application is rendering the ads by itself, it must inspect its attributes and methods.
General properties
mediaImpressionURLs
The urls that need to be called for generating an ad impression
@property (nonatomic, strong) NSArray *mediaImpressionURLsDeclared In
TDAd.h
mediaMIMEType
The type of the linear media as a MIME-type (usually audio or video)
@property (nonatomic, strong) NSString *mediaMIMETypeDeclared In
TDAd.h
format
The format of the ad. VAST or DAAST
@property (nonatomic, strong) NSString *formatDeclared In
TDAd.h
mediaURL
The url of the linear media
@property (nonatomic, strong) NSURL *mediaURLDeclared In
TDAd.h
Banner ads
companionBanners
An array of TDCompanionBanner objects for each banner available in the ad
@property (nonatomic, strong) NSArray *companionBannersDeclared In
TDAd.h
Video interstitials
videoWidth
The width of the video
@property (nonatomic, assign) NSInteger videoWidthDeclared In
TDAd.h
videoHeight
The height of the video
@property (nonatomic, assign) NSInteger videoHeightDeclared In
TDAd.h
videoClickThroughURL
The url that the app must be redirected when the user clicks in a video ad
@property (nonatomic, strong) NSURL *videoClickThroughURLDeclared In
TDAd.h
clickTrackingURLs
The list of urls that must be called to track the user clicking in a video ad
@property (nonatomic, strong) NSArray *clickTrackingURLsDeclared In
TDAd.h
Helper methods
– bestCompanionBannerForWidth:andHeight:
Returns the companion banner in the receiver’s companion banners list that approximates most the desired width and height.
- (TDCompanionBanner *)bestCompanionBannerForWidth:(NSInteger)width andHeight:(NSInteger)heightParameters
width |
the desired width of the banner |
|---|---|
height |
the desired height of the banner |
Return Value
A TDCompanionBanner that is the best match for the desired width and height.
Declared In
TDAd.h
– trackMediaImpressions
Tracks asynchronously all the media impressions URL for the ad. Useful when you are rendering your ads with custom UI.
- (void)trackMediaImpressionsDeclared In
TDAd.h
– trackVideoClick
Tracks asynchronously all the video click URLs for the ad. Useful when you are rendering your ads with custom UI.
- (void)trackVideoClickDeclared In
TDAd.h