GoogleMobileAds Framework Reference Stay organized with collections Save and categorize content based on your preferences.
GADAdLoader
@interfaceGADAdLoader:NSObjectLoads ads. See GADAdLoaderAdTypes.h for available ad types.
Object notified when an ad request succeeds or fails. Must conform to requested ad types’delegate protocols.
Declaration
Objective-C
@property(readwrite,nonatomic,nullable)id<GADAdLoaderDelegate>delegate;The ad loader’s ad unit ID.
Declaration
Objective-C
@property(readonly,nonatomic)NSString*_NonnulladUnitID;Indicates whether the ad loader is loading.
Declaration
Objective-C
@property(readonly,getter=isLoading,nonatomic)BOOLloading;Returns an initialized ad loader configured to load the specified ad types.
Declaration
Objective-C
-(nonnullinstancetype)initWithAdUnitID:(nonnullNSString*)adUnitIDrootViewController:(nullableUIViewController*)rootViewControlleradTypes:(nonnullNSArray<GADAdLoaderAdType>*)adTypesoptions:(nullableNSArray<GADAdLoaderOptions*>*)options;Parameters
rootViewControllerThe root view controller is used to present ad click actions.
adTypesAn array of ad types. See GADAdLoaderAdTypes.h for available ad types.
optionsAn array of GADAdLoaderOptions objects to configure how ads are loaded, or nilto use default options. See each ad type’s header for available GADAdLoaderOptions subclasses.
Loads the ad and informs the delegate of the outcome.
Declaration
Objective-C
-(void)loadRequest:(nullableGADRequest*)request;
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-03 UTC.