YMANativeBannerView

Objective-C

@interface YMANativeBannerView : UIView

Swift

class YMANativeBannerView : UIView

This class is a template for native advertising layout.

  1. Properties
  2. ad
  3. Methods
  4. -applyAppearance:
  5. +heightWithAd:width:appearance:

Properties

Loaded ad.

Declaration

Objective-C

@property (nonatomic, strong, nullable) id<YMANativeAd> ad;

Methods

-applyAppearance:

Applies the appearance settings from the template.

Declaration

Objective-C

- (void)applyAppearance:(nonnull YMANativeTemplateAppearance *)appearance;

Swift

func apply(_ appearance: YMANativeTemplateAppearance)

Parameters

appearance

Appearance of the ad (YMANativeTemplateAppearance).

appearance

Appearance of the ad (YMANativeTemplateAppearance).

+heightWithAd:width:appearance:

Calculates the height of the ad.

Declaration

Objective-C

+ (CGFloat)heightWithAd:(nonnull id<YMANativeAd>)ad
                  width:(CGFloat)width
             appearance:(nullable YMANativeTemplateAppearance *)appearance;

Parameters

ad

Loaded ad.

width

The width of the ad.

appearance

Appearance of the ad (YMANativeTemplateAppearance).

ad

Loaded ad.

width

The width of the ad.

appearance

Appearance of the ad (YMANativeTemplateAppearance).

Return Value

Returns the height of the ad.