To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

GoogleMobileAds Framework Reference

  • GADMediationBannerAd protocol represents a rendered banner ad with a single subview for integration into the view hierarchy.

  • It provides a view property to access the banner ad's view for display.

  • It offers an optional changeAdSizeTo: method to resize the banner, allowing for adaptable banner content.

GADMediationBannerAd

@protocol GADMediationBannerAd <GADMediationAd>

Rendered banner ad. Provides a single subview to add to the banner view’s view hierarchy.

  • The banner ad view.

    Declaration

    Swift

    var view: UIView { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) UIView *view;
  • Tells the ad to resize the banner. Implement if banner content is resizable.

    Declaration

    Swift

    optional func changeSize(to adSize: AdSize)

    Objective-C

    - (void)changeAdSizeTo:(GADAdSize)adSize;

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年08月20日 UTC.