The ADInterstitialAdDelegate protocol is implemented by an object so that your application can respond to changes in an ADInterstitialAd object. An ad object calls its delegate whenever the state of the ad changes.Called when an full-screen ad fails to load a new advertisement. (required)Called after an full-screen ad finishes executing its action.Called before an full-screen ad executes its action.Called after the advertisement loads its content.Called after a full-screen ad disposes of its content. (required)Called before the advertisement loads its content
Instance Method Summary (collapse)
Called when an full-screen ad fails to load a new advertisement.
Called after an full-screen ad finishes executing its action.
Called before an full-screen ad executes its action.
Called after the advertisement loads its content.
Called after a full-screen ad disposes of its content.
Called before the advertisement loads its content.
Instance Method Details
- () interstitialAd(interstitialAd, didFailWithError:error)
Called when an full-screen ad fails to load a new advertisement. (required) Although the error message informs your application about why the error occurred, normally your application does not need to display the error to the user.When an error occurs, your delegate should release the ad object.
- () interstitialAdActionDidFinish(interstitialAd)
Called after an full-screen ad finishes executing its action. When your application is notified that the advertisement has finished executing its action, it should resume any activities it paused before allowing the action to run.
- (Boolean) interstitialAdActionShouldBegin(interstitialAd, willLeaveApplication:willLeave)
Called before an full-screen ad executes its action. When the user taps a presented advertisement, the ad’s delegate is called to inform your application that the user wants to interact with the ad. To allow the action to be triggered, your method should return YES; to suppress the action, your method returns NO. Your application should almost always allow actions to be triggered; preventing actions may alter the advertisements your application sees and reduce the revenue your application earns through iAd.If the value of the willLeave parameter is YES and your delegate allows the advertisement to execute its action, then your application is moved to the background shortly after the call to this method completes.If the value of the willLeave parameter is NO, the advertisement’s interactive experience will run inside your application. To accomodate the advertisement, your application should disable activities that require user interaction as well as disabling any tasks or behaviors that may interfere with the advertisement. For example, a game might pause its game play and turn off sound effects until the user finishes interacting with the advertisement. Further, while the action is running, your application should also be prepared to respond to low-memory warnings by disposing of objects it can easily recreate after the advertisement completes its action.
- () interstitialAdDidLoad(interstitialAd)
Called after the advertisement loads its content. Your application implements this method to be notified when the ad object has finished downloading its content from the iAd Network. Your application may not present an ad object until after it finishes loading its content.
- () interstitialAdDidUnload(interstitialAd)
Called after a full-screen ad disposes of its content. (required) An ad object may unload its content for a number of reasons, including such cases as when an error occurs, after a user dismisses an advertisement that was presented modally, or after an advertisement’s contents have been loaded for a long period of time. The ad object automatically removes its contents from the screen if it was already presented to the user. Your implementation of this method should release the ad object.Important: Unlike a banner ad, a full-screen ad never downloads new contents after its contents are unloaded.
- () interstitialAdWillLoad(interstitialAd)
Called before the advertisement loads its content