Smart Banners
Stay organized with collections
Save and categorize content based on your preferences.
Smart Banners are ad units that render screen-width banner ads on any screen
size across different devices in either orientation. Smart Banners detect the
width of the device in its current orientation and create the ad view that size.
Smart Banners on iPhones have a height of 50 points in portrait and 32 points in
landscape. On iPads, height is 90 points in both portrait and landscape.
When an image ad isn't large enough to take up the entire allotted space, the
image will be centered, and the space on either side will be filled in.

To use Smart Banners, just specify kGADAdSizeSmartBannerPortrait
(for portait orientation) or kGADAdSizeSmartBannerLandscape
(for landscape
orientation) for the ad size:
Swift
let bannerView = GAMBannerView(adSize: kGADAdSizeSmartBannerPortrait)
Objective-C
GAMBannerView *bannerView = [[GAMBannerView alloc]
initWithAdSize:kGADAdSizeSmartBannerPortrait];
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-09-12 UTC.
[null,null,["Last updated 2025-09-12 UTC."],[],["Smart Banners display screen-width ads, adapting to any device size and orientation. They automatically detect device width and create appropriately sized ad views. On iPhones, banner heights are 50 points in portrait and 32 in landscape; on iPads, they are 90 points in both. Smaller image ads are centered, with surrounding space filled in. To implement, set the ad size to `kGADAdSizeSmartBannerPortrait` or `kGADAdSizeSmartBannerLandscape`. The newer adaptive banners are an alternative.\n"],null,[]]