GADNativeContentAd
class GADNativeContentAd : GADNativeAd
Native content ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeContent (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. If you request this ad type, your delegate must conform to the GADNativeContentAdLoaderDelegate protocol.
-
Primary text headline.
Declaration
Swift
var headline: String? { get }
-
Secondary text.
Declaration
Swift
var body: String? { get }
-
Large images.
Declaration
Swift
var images: [GADNativeAdImage]? { get }
-
Small logo image.
Declaration
Swift
var logo: GADNativeAdImage? { get }
-
Text that encourages user to take some action with the ad.
Declaration
Swift
var callToAction: String? { get }
-
Identifies the advertiser. For example, the advertiser’s name or visible URL.
Declaration
Swift
var advertiser: String? { get }
-
Video controller for controlling video playback in GADNativeContentAdView’s mediaView.
Declaration
Swift
var videoController: GADVideoController { get }
-
Registers ad view and asset views created with this native ad.
Declaration
Swift
func register(_ adView: UIView, assetViews: [GADNativeContentAdAssetID : UIView])
Parameters
assetViews
Dictionary of asset views keyed by asset IDs.
-
Registers ad view, clickable asset views, and nonclickable asset views with this native ad. Media view shouldn’t be registered as clickable.
Declaration
Swift
func register(_ adView: UIView, clickableAssetViews: [GADNativeContentAdAssetID : UIView], nonclickableAssetViews: [GADNativeContentAdAssetID : UIView])
Parameters
clickableAssetViews
Dictionary of asset views that are clickable, keyed by asset IDs.
nonclickableAssetViews
Dictionary of asset views that are not clickable, keyed by asset IDs.
-
Unregisters ad view from this native ad. The corresponding asset views will also be unregistered.
Declaration
Swift
func unregisterAdView()