Protocol: ADBannerViewDelegate

Overview

The ADBannerViewDelegate protocol is implemented by an object to react to changes in an ADBannerView object. The banner view calls its delegate when a new advertisement is loaded, when the user interacts with an advertisement, and when errors occur.Called when a banner view fails to load a new advertisement.Called after a banner view finishes executing an action that covered your application’s user interface.Called before a banner view executes an action.Called when a new banner advertisement is loaded.Called before a new banner advertisement is loaded.

Instance Method Summary (collapse)

Instance Method Details

- (Object) bannerView(banner, didFailToReceiveAdWithError:error)

Called when a banner view fails to load a new advertisement.

Parameters:

  • banner (ADBannerView)

    The banner view that failed to load an advertisement.

  • error (NSError)

    The error object that describes the problem.

Returns:

- (Object) bannerViewActionDidFinish(banner)

Called after a banner view finishes executing an action that covered your application’s user interface. If your delegate paused activities before allowing an action to run, it should resume those activities when this method is called.

Parameters:

  • banner (ADBannerView)

    The banner view that finished executing an action.

Returns:

- (Boolean) bannerViewActionShouldBegin(banner, willLeaveApplication:willLeave)

Called before a banner view executes an action. This method is called when the user taps the banner view. Your application controls whether the action is triggered. To allow the action to be triggered, return YES. To suppress the action, return 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 willLeave parameter is YES, then your application is moved to the background shortly after this method returns. In this situation, your method implementation does not need to perform additional work. If willLeave is set to NO, then the triggered action will cover your application’s user interface to show the advertising action. Although your application continues to run normally, your implementation of this method should disable activities that require user interaction while the action is executing. For example, a game might pause its game play until the user finishes watching the advertisement.

Parameters:

  • banner (ADBannerView)

    The banner view that the user tapped.

  • willLeave (Boolean)

    YES if another application will be launched to execute the action; NO if the action is going to be executed inside your application.

Returns:

  • (Boolean)

    Your delegate returns YES if the banner action should execute; NO to prevent the banner action from executing.

- (Object) bannerViewDidLoadAd(banner)

Called when a new banner advertisement is loaded. Your application implements this method to be notified when a new advertisement is ready for display.

Parameters:

  • banner (ADBannerView)

    The banner view that loaded a new advertisement.

Returns:

- (Object) bannerViewWillLoadAd(banner)

Called before a new banner advertisement is loaded.

Parameters:

  • banner (ADBannerView)

    The banner view that is about to load a new advertisement.

Returns: