YMAInterstitialController Class Reference

Inherits from UIViewController
Declared in YMAInterstitialController.h

Overview

This class is responsible for loading an interstitial ad.

  1. Properties
    1. blockID
    2. loaded
    3. delegate
    4. shouldOpenLinksInApp
    5. hasBeenPresented
  2. Methods
    1. – initWithBlockID:
    2. – load
    3. – loadWithRequest:
    4. – presentInterstitialFromViewController:
    5. – presentInterstitialFromViewController:dismissalBlock:

Properties

blockID

Block ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

@property (nonatomic, copy, readonly) NSString *blockID

loaded

Notifies that the ad is loaded and ready to be displayed. After the property takes the YES value, the [YMAInterstitialDelegate interstitialDidLoadAd:] delegate method is called.

@property (nonatomic, assign, readonly) BOOL loaded

delegate

An object that implements the YMAInterstitialDelegate protocol that tracks ad lifecycle events.

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

shouldOpenLinksInApp

Defines whether to open links in the app or in the browser installed on the device. The default value is NO.

@property (nonatomic, assign) BOOL shouldOpenLinksInApp

hasBeenPresented

Notifies whether the ad was displayed.

@property (nonatomic, assign, readonly) BOOL hasBeenPresented

Methods

– initWithBlockID:

Initializes an object of the YMAInterstitialController class with an interstitial ad.

- (instancetype)initWithBlockID:(NSString *)blockID

Parameters

blockID

Block ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

Return Value

An object of the YMAInterstitialController class with an interstitial ad.

– load

Preloads an ad. After this, use the [YMAInterstitialController presentInterstitialFromViewController:] method to start showing the ad.

- (void)load

– loadWithRequest:

Preloads the ad by setting the data for targeting.

- (void)loadWithRequest:(YMAAdRequest *)request

Parameters

request

Data for targeting (YMAAdRequest).

– presentInterstitialFromViewController:

Use this method to display an interstitial ad after preloading.

- (void)presentInterstitialFromViewController:(UIViewController *)viewController

Parameters

viewController

An object of the UIViewController class, which is used to display an interstitial ad.

– presentInterstitialFromViewController:dismissalBlock:

Use this method to display an interstitial ad after preloading if you need the app to perform some action immediately after showing the ad.

- (void)presentInterstitialFromViewController:(UIViewController *)viewController
                               dismissalBlock:(void ( ^ ) ( void ))dismissalBlock

Parameters

viewController

An object of the UIViewController class.

dismissalBlock

A block of code that executes after the ad is shown.


Generated by appledoc 2.2.1 (build 1334).