GADNativeContentAd
@interface 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 }
Objective-C
@property (readonly, copy, nonatomic, nullable) NSString *headline;
-
Secondary text.
Declaration
Swift
var body: String? { get }
Objective-C
@property (readonly, copy, nonatomic, nullable) NSString *body;
-
Large images.
Declaration
Swift
var images: [Any]? { get }
Objective-C
@property (readonly, copy, nonatomic, nullable) NSArray *images;
-
Small logo image.
Declaration
Swift
var logo: GADNativeAdImage? { get }
Objective-C
@property (readonly, strong, nonatomic, nullable) GADNativeAdImage *logo;
-
Text that encourages user to take some action with the ad.
Declaration
Swift
var callToAction: String? { get }
Objective-C
@property (readonly, copy, nonatomic, nullable) NSString *callToAction;
-
Identifies the advertiser. For example, the advertiser’s name or visible URL.
Declaration
Swift
var advertiser: String? { get }
Objective-C
@property (readonly, copy, nonatomic, nullable) NSString *advertiser;
-
Video controller for controlling video playback in GADNativeContentAdView’s mediaView.
Declaration
Swift
var videoController: GADVideoController { get }
Objective-C
@property (readonly, strong, nonatomic) GADVideoController *_Nonnull videoController;
-
Registers ad view and asset views created with this native ad.
Declaration
Swift
func registerView(_ adView: Any!, assetViews: [AnyHashable : Any])
Objective-C
- (void)registerAdView:(id)adView assetViews:(nonnull NSDictionary *)assetViews;
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 registerView(_ adView: Any!, clickableAssetViews: [AnyHashable : Any], nonclickableAssetViews: [AnyHashable : Any])
Objective-C
- (void)registerAdView:(id)adView clickableAssetViews:(nonnull NSDictionary *)clickableAssetViews nonclickableAssetViews:(nonnull NSDictionary *)nonclickableAssetViews;
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()
Objective-C
- (void)unregisterAdView;