AdColonyInterstitial Class Reference
Inherits from | NSObject |
---|---|
Declared in | AdColonyInterstitial.h |
Overview
Ad object returned from a request. This is used to show and receive callbacks once the ad is presented.
Properties
delegate
Interstitial delegate
@property (nonatomic, nullable, weak) id<AdColonyInterstitialDelegate> delegate
Discussion
Delegate object that receives interstitial lifecycle notifications.
Declared In
AdColonyInterstitial.h
zoneID
Represents the unique zone identifier string from which the interstitial was requested.
@property (nonatomic, strong, readonly) NSString *zoneID
Discussion
AdColony zone IDs can be created at the Control Panel.
Declared In
AdColonyInterstitial.h
expired
Indicates whether or not the interstitial has been played or if it has met its expiration time.
@property (atomic, assign, readonly) BOOL expired
Discussion
AdColony interstitials become expired as soon as the ad launches or just before they have met their expiration time.
Declared In
AdColonyInterstitial.h
audioEnabled
Indicates whether or not the interstitial has audio enabled.
@property (nonatomic, assign, readonly) BOOL audioEnabled
Discussion
Leverage this property to determine if the application’s audio should be paused while the ad is playing.
Declared In
AdColonyInterstitial.h
iapEnabled
Indicates whether or not the interstitial is configured to trigger IAPs.
@property (nonatomic, assign, readonly) BOOL iapEnabled
Discussion
Leverage this property to determine if the interstitial is configured to trigger IAPs.
Declared In
AdColonyInterstitial.h
Ad Playback
– showWithPresentingViewController:
Triggers a fullscreen ad experience.
- (BOOL)showWithPresentingViewController:(UIViewController *)viewController
Parameters
viewController |
The view controller on which the interstitial will display itself. |
---|
Return Value
Whether the SDK was ready to begin playback.
Declared In
AdColonyInterstitial.h
– cancel
Cancels the interstitial and returns control back to the application.
- (void)cancel
Discussion
Call this method to cancel the interstitial. Note that canceling interstitials before they finish will diminish publisher revenue.
Declared In
AdColonyInterstitial.h
Ad Event Handlers
– setOpen:
Sets the block of code to be executed when the interstitial is displayed to the user.
- (void)setOpen:(nullable void ( ^ ) ( void ))open
Parameters
open |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setClose:
Sets the block of code to be executed when the interstitial is removed from the view hierarchy. It’s recommended to request a new ad within this callback.
- (void)setClose:(nullable void ( ^ ) ( void ))close
Parameters
close |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setExpire:
Sets the block of code to be executed when an interstitial expires and is no longer valid for playback. This does not get triggered when the expired flag is set because it has been viewed. It’s recommended to request a new ad within this callback.
- (void)setExpire:(nullable void ( ^ ) ( void ))expire
Parameters
expire |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setLeftApplication:
Sets the block of code to be executed when an action causes the user to leave the application.
- (void)setLeftApplication:(nullable void ( ^ ) ( void ))leftApplication
Parameters
leftApplication |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setClick:
Sets the block of code to be executed when the user taps on the interstitial ad, causing an action to be taken.
- (void)setClick:(nullable void ( ^ ) ( void ))click
Parameters
click |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
Videos For Purchase (V4P)
– setIapOpportunity:
Sets the block of code to be executed when the ad triggers an IAP opportunity.
- (void)setIapOpportunity:(nullable void ( ^ ) ( NSString *iapProductID , AdColonyIAPEngagement engagement ))iapOpportunity
Parameters
iapOpportunity |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setAudioStart:
Sets the block of code to be executed when the interstitial begins playing audio.
- (void)setAudioStart:(nullable void ( ^ ) ( void ))audioStart
Parameters
audioStart |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h
– setAudioStop:
Sets the block of code to be executed when the interstitial stops playing audio.
- (void)setAudioStop:(nullable void ( ^ ) ( void ))audioStop
Parameters
audioStop |
The block of code to be executed. |
---|
Discussion
Note that the associated code block will be dispatched on the main thread.
Declared In
AdColonyInterstitial.h