スマートバナー
スマートバナーは、あらゆる画面サイズのデバイスで、画面をどの向きにしていても横幅いっぱいに広告を表示できる広告ユニットです。デバイスの向きに応じて画面の横幅が検知され、そのサイズの広告ビューが作成されます。
iPhone 向けのスマートバナーの縦向きの高さは 50 ポイント、横向きの高さは 32 ポイントです。iPad では、縦と横の高さは 90 ポイントです。
イメージ広告の大きさが割り当てられたスペース全体に満たない場合は、画像が中央寄せになり、両側のスペースが塗りつぶされます。

スマートバナーを使用するには、広告サイズとして kGADAdSizeSmartBannerPortrait
(縦向きの場合)か kGADAdSizeSmartBannerLandscape
(横向きの場合)を指定します。
Swift
let bannerView = GAMBannerView(adSize: kGADAdSizeSmartBannerPortrait)
Objective-C
GAMBannerView *bannerView = [[GAMBannerView alloc]
initWithAdSize:kGADAdSizeSmartBannerPortrait];
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-20 UTC。
[null,null,["最終更新日 2025-02-20 UTC。"],[[["Smart Banners automatically adjust to screen width on different devices and orientations, with fixed heights of 50/32 points on iPhones (portrait/landscape) and 90 points on iPads."],["They display screen-width banner ads, centering smaller image ads and filling the surrounding space."],["Developers can implement Smart Banners using `kGADAdSizeSmartBannerPortrait` for portrait or `kGADAdSizeSmartBannerLandscape` for landscape orientation."],["It is recommended to use adaptive banners instead of Smart Banners for better functionality."]]],["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"]]