GADBannerViewDelegate.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // GADBannerViewDelegate.h
  3. // Google Mobile Ads SDK
  4. //
  5. // Copyright 2011 Google Inc. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. @class GADBannerView;
  9. @class GADRequestError;
  10. /// Delegate methods for receiving GADBannerView state change messages such as ad request status
  11. /// and ad click lifecycle.
  12. @protocol GADBannerViewDelegate<NSObject>
  13. @optional
  14. #pragma mark Ad Request Lifecycle Notifications
  15. /// Tells the delegate that an ad request successfully received an ad. The delegate may want to add
  16. /// the banner view to the view hierarchy if it hasn't been added yet.
  17. - (void)adViewDidReceiveAd:(GADBannerView *)bannerView;
  18. /// Tells the delegate that an ad request failed. The failure is normally due to network
  19. /// connectivity or ad availablility (i.e., no fill).
  20. - (void)adView:(GADBannerView *)bannerView didFailToReceiveAdWithError:(GADRequestError *)error;
  21. #pragma mark Click-Time Lifecycle Notifications
  22. /// Tells the delegate that a full screen view will be presented in response to the user clicking on
  23. /// an ad. The delegate may want to pause animations and time sensitive interactions.
  24. - (void)adViewWillPresentScreen:(GADBannerView *)bannerView;
  25. /// Tells the delegate that the full screen view will be dismissed.
  26. - (void)adViewWillDismissScreen:(GADBannerView *)bannerView;
  27. /// Tells the delegate that the full screen view has been dismissed. The delegate should restart
  28. /// anything paused while handling adViewWillPresentScreen:.
  29. - (void)adViewDidDismissScreen:(GADBannerView *)bannerView;
  30. /// Tells the delegate that the user click will open another app, backgrounding the current
  31. /// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:,
  32. /// are called immediately before this method is called.
  33. - (void)adViewWillLeaveApplication:(GADBannerView *)bannerView;
  34. @end