Types of Views for native ads

Each type of native ad has a set of required and optional subviews that are necessary for binding an ad.

  1. Types of native ads and assets
  2. Asset descriptions

Types of native ads and assets

Subview Type Required
ageLabel UILabel Yes
bodyLabel UILabel Yes
callToActionButton UIButton Yes
domainLabel UILabel No
feedbackButton UIButton No
iconImageView UIImageView Yes
imageView (deprecated) UIImageView No
mediaView YMANativeMediaView No
priceLabel UILabel No
ratingView UIView<YMARating> No
reviewCountLabel UILabel No
sponsoredLabel UILabel Yes
titleLabel UILabel Yes
warningLabel UILabel Yes

Asset descriptions

  1. ageLabel
  2. bodyLabel
  3. callToActionButton
  4. domainLabel
  5. feedbackButton
  6. iconImageView
  7. ImageView
  8. mediaView
  9. priceLabel
  10. ratingView
  11. reviewCountLabel
  12. sponsoredLabel
  13. titleLabel
  14. warningLabel

ageLabel

Subview for age data.

bodyLabel

Subview for the main ad text.

callToActionButton

Subview with a call to action.

domainLabel

Subview for domain data.

feedbackButton

The feedbackButton asset allows the user to specify the reason before closing the ad. User feedback makes it possible to select more relevant ads.

Note.

The developer must define what to do with the ad after the reason for closing it is chosen (for example, hide the ad or show a text). If there is no further action defined, the SDK will register the reason for closing, but the ad will not be hidden.

Subview to process the reason for closing the ad.

iconImageView

Subview for the icon.

ImageView

Attention.

This asset is deprecated. Use the new mediaView asset.

Subview for the main ad image.

mediaView

Use this asset for displaying media content, such as an image (an alternative to the imageView asset) or a video.
Note.

We don't recommend setting a view for image and media at the same time.

If you do transmit views for image and media simultaneously, make sure that the passed views are not displayed at the same time.

How media content is displayed in mediaView: if the response to the ad request contains media content, mediaView displays it after buffering.

Tip.

To check for the presence of media content, use the media property of the YMANativeAdAssets object. If the response contains media content, the property returns a nonzero YMANativeAdMedia object.

Subview for media content (image or video).

priceLabel

Subview for data about the price of the advertised app.

ratingView

Subview that implements the YMARating protocol for data about the app's rating.

reviewCountLabel

Subview for data about the number of app reviews.

sponsoredLabel

Subview for data about the advertising network.

titleLabel

Subview for the ad title.

warningLabel

Subview for the warning or disclaimer.