Stay organized with collections
Save and categorize content based on your preferences.
GADAdSizeDelegate
@protocol GADAdSizeDelegate <NSObject>
The class implementing this protocol will be notified when the GADBannerView’s ad content
changes size. Any views that may be affected by the banner size change will have time to adjust.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGADAdSizeDelegate\u003c/code\u003e protocol enables a class to be notified about changes in the size of ad content displayed within a \u003ccode\u003eGADBannerView\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eImplementing this protocol allows views to dynamically adjust to size changes before they happen, ensuring a smoother user experience.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadView:willChangeAdSizeTo:\u003c/code\u003e method is the core of this protocol, signaling an impending size change and providing the new dimensions.\u003c/p\u003e\n"]]],["The `GADAdSizeDelegate` protocol notifies a class when a `GADBannerView`'s ad content changes size. The key action is the `-adView:willChangeAdSizeTo:` method, which is called *before* the ad view changes to a new size. This method provides the affected views the opportunity to adjust to the impending change. The `adView` parameter refers to the `GADBannerView`, and `size` represents the new `GADAdSize`.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADAdSizeDelegate\n=================\n\n @protocol GADAdSizeDelegate \u003cNSObject\u003e\n\nThe class implementing this protocol will be notified when the GADBannerView's ad content\nchanges size. Any views that may be affected by the banner size change will have time to adjust.\n- `\n ``\n ``\n `\n\n ### [-adView:willChangeAdSizeTo:](#/c:objc(pl)GADAdSizeDelegate(im)adView:willChangeAdSizeTo:)\n\n `\n ` \n Called before the ad view changes to the new size. \n\n #### Declaration\n\n Swift \n\n func adView(_ bannerView: ../Classes/GADBannerView.html, willChangeAdSizeTo size: AdSize)\n\n Objective-C \n\n - (void)adView:(nonnull ../Classes/GADBannerView.html *)bannerView\n willChangeAdSizeTo:(../Structs/GADAdSize.html)size;"]]