GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADBannerViewDelegate
protocol GADBannerViewDelegate : NSObjectProtocol
Delegate methods for receiving GADBannerView state change messages such as ad request status
and ad click lifecycle.
-
Tells the delegate that an ad request successfully received an ad. The delegate may want to add
the banner view to the view hierarchy if it hasn’t been added yet.
Declaration
Swift
optional func adViewDidReceiveAd(_ bannerView: GADBannerView)
-
Tells the delegate that an ad request failed. The failure is normally due to network
connectivity or ad availablility (i.e., no fill).
-
Tells the delegate that a full screen view will be presented in response to the user clicking on
an ad. The delegate may want to pause animations and time sensitive interactions.
Declaration
Swift
optional func adViewWillPresentScreen(_ bannerView: GADBannerView)
-
Tells the delegate that the full screen view will be dismissed.
Declaration
Swift
optional func adViewWillDismissScreen(_ bannerView: GADBannerView)
-
Tells the delegate that the full screen view has been dismissed. The delegate should restart
anything paused while handling adViewWillPresentScreen:.
Declaration
Swift
optional func adViewDidDismissScreen(_ bannerView: GADBannerView)
-
Tells the delegate that the user click will open another app, backgrounding the current
application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:,
are called immediately before this method is called.
Declaration
Swift
optional func adViewWillLeaveApplication(_ bannerView: GADBannerView)
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 2021-03-03 UTC.
[null,null,["Last updated 2021-03-03 UTC."],[],[],null,["GADBannerViewDelegate \n\n protocol GADBannerViewDelegate : NSObjectProtocol\n\nDelegate methods for receiving GADBannerView state change messages such as ad request status\nand ad click lifecycle.\n[Ad Request Lifecycle Notifications](#/Ad%20Request%20Lifecycle%20Notifications)\n\n- `\n ``\n ``\n `\n\n [adViewDidReceiveAd(_:)](#/c:objc(pl)GADBannerViewDelegate(im)adViewDidReceiveAd:)`\n ` \n Tells the delegate that an ad request successfully received an ad. The delegate may want to add\n the banner view to the view hierarchy if it hasn't been added yet. \n\n Declaration \n Swift \n\n optional func adViewDidReceiveAd(_ bannerView: ../Classes/GADBannerView.html)\n\n- `\n ``\n ``\n `\n\n [adView(_:didFailToReceiveAdWithError:)](#/c:objc(pl)GADBannerViewDelegate(im)adView:didFailToReceiveAdWithError:)`\n ` \n Tells the delegate that an ad request failed. The failure is normally due to network\n connectivity or ad availablility (i.e., no fill). \n\n Declaration \n Swift \n\n optional func adView(_ bannerView: ../Classes/GADBannerView.html, didFailToReceiveAdWithError error: ../Classes.html#/c:objc(cs)GADRequestError)\n\n[Click-Time Lifecycle Notifications](#/Click-Time%20Lifecycle%20Notifications)\n\n- `\n ``\n ``\n `\n\n [adViewWillPresentScreen(_:)](#/c:objc(pl)GADBannerViewDelegate(im)adViewWillPresentScreen:)`\n ` \n Tells the delegate that a full screen view will be presented in response to the user clicking on\n an ad. The delegate may want to pause animations and time sensitive interactions. \n\n Declaration \n Swift \n\n optional func adViewWillPresentScreen(_ bannerView: ../Classes/GADBannerView.html)\n\n- `\n ``\n ``\n `\n\n [adViewWillDismissScreen(_:)](#/c:objc(pl)GADBannerViewDelegate(im)adViewWillDismissScreen:)`\n ` \n Tells the delegate that the full screen view will be dismissed. \n\n Declaration \n Swift \n\n optional func adViewWillDismissScreen(_ bannerView: ../Classes/GADBannerView.html)\n\n- `\n ``\n ``\n `\n\n [adViewDidDismissScreen(_:)](#/c:objc(pl)GADBannerViewDelegate(im)adViewDidDismissScreen:)`\n ` \n Tells the delegate that the full screen view has been dismissed. The delegate should restart\n anything paused while handling adViewWillPresentScreen:. \n\n Declaration \n Swift \n\n optional func adViewDidDismissScreen(_ bannerView: ../Classes/GADBannerView.html)\n\n- `\n ``\n ``\n `\n\n [adViewWillLeaveApplication(_:)](#/c:objc(pl)GADBannerViewDelegate(im)adViewWillLeaveApplication:)`\n ` \n Tells the delegate that the user click will open another app, backgrounding the current\n application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:,\n are called immediately before this method is called. \n\n Declaration \n Swift \n\n optional func adViewWillLeaveApplication(_ bannerView: ../Classes/GADBannerView.html)"]]