بنرهای هوشمند
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
بنرهای هوشمند واحدهای تبلیغاتی هستند که تبلیغات بنری با عرض صفحه را در هر اندازه صفحه در دستگاه های مختلف در هر جهت ارائه می کنند. بنرهای هوشمند عرض دستگاه را در جهت فعلی آن تشخیص می دهند و نمای تبلیغاتی را در آن اندازه ایجاد می کنند.
بنرهای هوشمند در آیفون ها دارای ارتفاع 50 نقطه در عمودی و 32 نقطه در افقی هستند. در iPads، ارتفاع 90 نقطه در هر دو حالت عمودی و افقی است.
وقتی یک تبلیغ تصویری به اندازه کافی بزرگ نباشد که کل فضای اختصاص داده شده را اشغال کند، تصویر در مرکز قرار می گیرد و فضای دو طرف پر می شود.

برای استفاده از بنرهای هوشمند، کافی است kGADAdSizeSmartBannerPortrait
(برای جهت عمودی) یا kGADAdSizeSmartBannerLandscape
(برای جهت افقی) را برای اندازه تبلیغ مشخص کنید:
سویفت
let bannerView = GAMBannerView(adSize: kGADAdSizeSmartBannerPortrait)
هدف-C
GAMBannerView *bannerView = [[GAMBannerView alloc]
initWithAdSize:kGADAdSizeSmartBannerPortrait];
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-23 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-23 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eSmart 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.\u003c/p\u003e\n"],["\u003cp\u003eThey display screen-width banner ads, centering smaller image ads and filling the surrounding space.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can implement Smart Banners using \u003ccode\u003ekGADAdSizeSmartBannerPortrait\u003c/code\u003e for portrait or \u003ccode\u003ekGADAdSizeSmartBannerLandscape\u003c/code\u003e for landscape orientation.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to use adaptive banners instead of Smart Banners for better functionality.\u003c/p\u003e\n"]]],["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,["| Try the newer [adaptive banners](/ad-manager/mobile-ads-sdk/ios/banner/anchored-adaptive) instead.\n\nSmart Banners are ad units that render screen-width banner ads on any screen\nsize across different devices in either orientation. Smart Banners detect the\nwidth of the device in its current orientation and create the ad view that size.\n\nSmart Banners on iPhones have a height of 50 points in portrait and 32 points in\nlandscape. On iPads, height is 90 points in both portrait and landscape.\n\nWhen an image ad isn't large enough to take up the entire allotted space, the\nimage will be centered, and the space on either side will be filled in.\n\nTo use Smart Banners, just specify `kGADAdSizeSmartBannerPortrait`\n(for portait orientation) or `kGADAdSizeSmartBannerLandscape` (for landscape\norientation) for the ad size: \n\nSwift \n\n```swift\nlet bannerView = GAMBannerView(adSize: kGADAdSizeSmartBannerPortrait)\n```\n\nObjective-C \n\n```objective-c\nGAMBannerView *bannerView = [[GAMBannerView alloc]\n initWithAdSize:kGADAdSizeSmartBannerPortrait];\n```"]]