GADInterstitialDelegate.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // GADInterstitialDelegate.h
  3. // Google AdMob Ads SDK
  4. //
  5. // Copyright 2011 Google Inc. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "GADModules.h"
  9. @class GADInterstitial;
  10. @class GADRequestError;
  11. /// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad
  12. /// requests succeeding/failing.
  13. @protocol GADInterstitialDelegate<NSObject>
  14. @optional
  15. #pragma mark Ad Request Lifecycle Notifications
  16. /// Called when an interstitial ad request succeeded. Show it at the next transition point in your
  17. /// application such as when transitioning between view controllers.
  18. - (void)interstitialDidReceiveAd:(GADInterstitial *)ad;
  19. /// Called when an interstitial ad request completed without an interstitial to
  20. /// show. This is common since interstitials are shown sparingly to users.
  21. - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error;
  22. #pragma mark Display-Time Lifecycle Notifications
  23. /// Called just before presenting an interstitial. After this method finishes the interstitial will
  24. /// animate onto the screen. Use this opportunity to stop animations and save the state of your
  25. /// application in case the user leaves while the interstitial is on screen (e.g. to visit the App
  26. /// Store from a link on the interstitial).
  27. - (void)interstitialWillPresentScreen:(GADInterstitial *)ad;
  28. /// Called before the interstitial is to be animated off the screen.
  29. - (void)interstitialWillDismissScreen:(GADInterstitial *)ad;
  30. /// Called just after dismissing an interstitial and it has animated off the screen.
  31. - (void)interstitialDidDismissScreen:(GADInterstitial *)ad;
  32. /// Called just before the application will background or terminate because the user clicked on an
  33. /// ad that will launch another application (such as the App Store). The normal
  34. /// UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately
  35. /// before this.
  36. - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad;
  37. @end