GoogleMobileAds Framework Reference  |  iOS  |  Google for Developers | Latest TMZ Celebrity News & Gossip | Watch TMZ Live

GoogleMobileAds Framework Reference

GADAdLoader


@interface GADAdLoader : NSObject

Loads ads. See GADAdLoaderAdTypes.h for available ad types.

  • Object notified when an ad request succeeds or fails. Must conform to requested ad types’ delegate protocol. This property must be set before initiating ad requests.

    Declaration

    Swift

    weak var delegate: (any AdLoaderDelegate)? { get set }

    Objective-C

    @property (nonatomic, weak, nullable) id<GADAdLoaderDelegate> delegate;
  • The ad loader’s ad unit ID.

    Declaration

    Swift

    var adUnitID: String { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *adUnitID;
  • Indicates whether the ad loader is loading.

    Declaration

    Swift

    var isLoading: Bool { get }

    Objective-C

    @property (nonatomic, readonly, getter=isLoading) BOOL loading;
  • Returns an initialized ad loader configured to load the specified ad types.

    Declaration

    Swift

    init(adUnitID: String, rootViewController: UIViewController?, adTypes: [AdLoaderAdType], options: [GADAdLoaderOptions]?)

    Objective-C

    - (nonnull instancetype)
          initWithAdUnitID:(nonnull NSString *)adUnitID
        rootViewController:(nullable UIViewController *)rootViewController
                   adTypes:(nonnull NSArray<GADAdLoaderAdType> *)adTypes
                   options:(nullable NSArray<GADAdLoaderOptions *> *)options;

    Parameters

    rootViewController

    The root view controller is used to present ad click actions.

    adTypes

    An array of ad types. See GADAdLoaderAdTypes.h for available ad types.

    options

    An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to use default options. See each ad type’s header for available GADAdLoaderOptions subclasses.

  • Loads the ad and informs the delegate of the outcome.

    Declaration

    Swift

    func load(_ request: Request?)

    Objective-C

    - (void)loadRequest:(nullable GADRequest *)request;
  • Returns an initialized ad loader.

    Declaration

    Swift

    init(rootViewController: UIViewController?)

    Objective-C

    - (nonnull instancetype)initWithRootViewController:
        (nullable UIViewController *)rootViewController;

    Parameters

    rootViewController

    The root view controller used to present ad click actions.

  • Loads the ad and informs the delegate of the outcome.

    Declaration

    Swift

    func load(with adResponseString: String)

    Objective-C

    - (void)loadWithAdResponseString:(nonnull NSString *)adResponseString;

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.