YMAAdView Class Reference

Inherits from UIView
Declared in YMAAdView.h

Overview

This class is responsible for setting up and displaying banners.

  1. Properties
    1. delegate
    2. blockID
    3. videoController
  2. Methods
    1. – initWithBlockID:adSize:delegate:
    2. – initWithBlockID:size:delegate:
    3. – displayAtTopInView:
    4. – displayAtBottomInView:
    5. – loadAd
    6. – loadAdWithRequest:
    7. – adContentSize

Properties

delegate

An object that implements the YMAAdViewDelegate protocol that tracks the ad and receives notifications about user interaction with the ad. It provides data necessary for displaying the ad (for example, a UIViewController object that AdView uses to show a modal controller in response to the user interacting with the banner).

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

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

videoController

An object of the YMAVideoController class, which manages the video content in an ad.

@property (nonatomic, strong, readonly) YMAVideoController *videoController

Methods

– initWithBlockID:adSize:delegate:

Initializes an object of the YMAAdView class to display the banner with the specified size.

- (instancetype)initWithBlockID:(NSString *)blockID
                         adSize:(YMAAdSize *)adSize
                       delegate:(id<YMAAdViewDelegate>)delegate

Parameters

blockID

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

adSize

The size of the banner. The size of the banner is set in the YMAAdSize class.

delegate

The object implements the YMAAdViewDelegate protocol that tracks the ad.

Return Value

Initializes an object of the YMAAdView class to display the banner with the specified size.

– initWithBlockID:size:delegate:

Initializes an object of the YMAAdView class to display the banner with the fixed size.

- (instancetype)initWithBlockID:(NSString *)blockID
                           size:(CGSize)size
                       delegate:(id<YMAAdViewDelegate>)delegate

Parameters

blockID

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

size

The size of the banner.

delegate

The object implements the YMAAdViewDelegate protocol that tracks the ad.

Return Value

Initializes an object of the YMAAdView class to display the banner with the specified size.

Discussion

Note: This method is deprecated. Use [YMAAdView initWithBlockID:adSize:delegate:].

– displayAtTopInView:

Displays the banner centered at the top of the passed View.

- (void)displayAtTopInView:(UIView *)view

Parameters

view

An object of the UIView class to add the banner to.

– displayAtBottomInView:

Displays the banner centered at the bottom of the passed View.

- (void)displayAtBottomInView:(UIView *)view

Parameters

view

An object of the UIView class to add the banner to.

– loadAd

Loads a banner.

- (void)loadAd

– loadAdWithRequest:

Loads a banner with data for targeting.

- (void)loadAdWithRequest:(YMAAdRequest *)request

Parameters

request

Data for targeting (YMAAdRequest).

– adContentSize

Returns the size of the banner content.

- (CGSize)adContentSize

Return Value

The size of the banner content.


Generated by appledoc 2.2.1 (build 1334).