Smart Banners

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];