GoogleMobileAds Framework ReferenceStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
GADMediaView displays native ad media content, such as video or images.
To use GADMediaView, add it as a subview to a GADNativeAdView and assign it to the native ad view'smediaViewproperty.
Set the native ad'smediaContentproperty to the media view to display the content.
ThemediaContentproperty determines what media is shown in the view.
GADMediaView
@interface GADMediaView : UIView
Displays native ad media content.
To display media content in GADNativeAdView instances, add a GADMediaView subview,
assign the native ad view’s mediaView property, and set the native ad’s mediaContent property to
the media view.
If the native ad contains video content, the media view displays the video content.
If the native ad doesn’t have video content and image loading is enabled, the media view
displays the first image from the native ad’s |images| property.
If the native ad doesn’t have video content and image loading is disabled, the media view is
empty.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],["GADMediaView displays media content from native ads. To use it, add it as a subview to a GADNativeAdView, assign it to the native ad view's `mediaView` property, and set the native ad's `mediaContent` property. It displays video if available, otherwise, it shows the first image from the ad's `images` property (if enabled) or remains empty (if disabled). The `mediaContent` property is how you assign the content to display.\n"]]