GADInterstitialDelegate.h 2.0 KB

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