GoogleMobileAds Framework Reference
GAMBannerAdLoaderDelegate
The delegate of a GADAdLoader object must conform to this protocol to receive GAMBannerViews.
-
Asks the delegate which banner ad sizes should be requested.
Declaration
Swift
func validBannerSizes(for adLoader: AdLoader) -> [NSValue]
Objective-C
- (nonnull NSArray<NSValue *> *)validBannerSizesForAdLoader:
(nonnull GADAdLoader *)adLoader;
-
Tells the delegate that a Google Ad Manager banner ad was received.
Declaration
Swift
func adLoader(_ adLoader: AdLoader, didReceive bannerView: AdManagerBannerView)
Objective-C
- (void)adLoader:(nonnull GADAdLoader *)adLoader
didReceiveGAMBannerView:(nonnull GAMBannerView *)bannerView;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-04 UTC.
[null,null,["Last updated 2025-02-04 UTC."],[[["`GAMBannerAdLoaderDelegate` helps in receiving `GAMBannerViews` when using a `GADAdLoader`."],["This delegate protocol requires you to specify the valid banner ad sizes that should be requested."],["Upon successfully receiving a Google Ad Manager banner ad, the delegate is notified through the `adLoader:didReceiveGAMBannerView:` method."]]],["The `GAMBannerAdLoaderDelegate` protocol requires its delegate to receive `GAMBannerViews`. It specifies two key actions: First, the delegate must define `validBannerSizesForAdLoader:`, which determines the acceptable banner ad sizes for the request. Second, the delegate must implement `adLoader:didReceiveGAMBannerView:`, a method that is invoked when a Google Ad Manager banner ad is received, providing the loaded `GAMBannerView` and the related `AdLoader` object.\n"]]