# GoogleMobileAds Framework Reference

# GADCustomEventBannerDelegate

Deprecated

Use GADMediationBannerAdEventDelegate instead.

    @protocol GADCustomEventBannerDelegate <NSObject>

Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd:
when there is an ad to show, or customEventBanner:didFailAd: when there is no ad to show.
Otherwise, if enough time passed (several seconds) after the SDK called the requestBannerAd:
method of your custom event, the mediation SDK will consider the request timed out, and move on
to the next ad network.
- `


  ### [-customEventBanner:didReceiveAd:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBanner:didReceiveAd:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event object must call this when it receives or creates an ad view.

  #### Declaration

  Swift

      func customEventBanner(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html, didReceiveAd view: UIView)

  Objective-C

      - (void)customEventBanner:(nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent
                   didReceiveAd:(nonnull UIView *)view;

- `


  ### [-customEventBanner:didFailAd:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBanner:didFailAd:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event object must call this when it fails to receive or create the ad view. Pass
  along any error object sent from the ad network's SDK, or an NSError describing the error. Pass
  nil if not available.

  #### Declaration

  Swift

      func customEventBanner(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html, didFailAd error: (any Error)?)

  Objective-C

      - (void)customEventBanner:(nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent
                      didFailAd:(nullable NSError *)error;

- `


  ### [-customEventBannerWasClicked:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBannerWasClicked:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event object should call this when the user touches or "clicks" the ad to initiate
  an action. When the SDK receives this callback, it reports the click back to the mediation
  server.

  #### Declaration

  Swift

      func customEventBannerWasClicked(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html)

  Objective-C

      - (void)customEventBannerWasClicked:
          (nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent;

- `


  ### [viewControllerForPresentingModalView](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(py)viewControllerForPresentingModalView)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  The rootViewController that you set in GADBannerView. Use this UIViewController to show a modal
  view when a user taps on the ad.

  #### Declaration

  Swift

      var viewControllerForPresentingModalView: UIViewController { get }

  Objective-C

      @property (nonatomic, readonly, nonnull) UIViewController *viewControllerForPresentingModalView;

- `


  ### [-customEventBannerWillPresentModal:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBannerWillPresentModal:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event should call this when the user taps an ad and a modal view appears.

  #### Declaration

  Swift

      func customEventBannerWillPresentModal(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html)

  Objective-C

      - (void)customEventBannerWillPresentModal:
          (nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent;

- `


  ### [-customEventBannerWillDismissModal:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBannerWillDismissModal:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event should call this when the user dismisses the modal view and the modal view is
  about to go away.

  #### Declaration

  Swift

      func customEventBannerWillDismissModal(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html)

  Objective-C

      - (void)customEventBannerWillDismissModal:
          (nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent;

- `


  ### [-customEventBannerDidDismissModal:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBannerDidDismissModal:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Your Custom Event should call this when the user dismisses the modal view and the modal view has
  gone away.

  #### Declaration

  Swift

      func customEventBannerDidDismissModal(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html)

  Objective-C

      - (void)customEventBannerDidDismissModal:
          (nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent;

[## Deprecated](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/Deprecated)

- `


  ### [-customEventBanner:clickDidOccurInAd:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBanner:clickDidOccurInAd:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Deprecated. Use customEventBannerWasClicked:.

  #### Declaration

  Swift

      func customEventBanner(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html, clickDidOccurInAd view: UIView)

  Objective-C

      - (void)customEventBanner:(nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent
              clickDidOccurInAd:(nonnull UIView *)view;

- `


  ### [-customEventBannerWillLeaveApplication:](https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBannerDelegate#/c:objc(pl)GADCustomEventBannerDelegate(im)customEventBannerWillLeaveApplication:)


  ` Deprecated

  Use GADMediationBannerAdEventDelegate instead.
  Deprecated. No replacement.

  #### Declaration

  Swift

      func customEventBannerWillLeaveApplication(_ customEvent: any https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html)

  Objective-C

      - (void)customEventBannerWillLeaveApplication:
          (nonnull id<https://developers.google.com/admob/ios/api/reference/Protocols/GADCustomEventBanner.html>)customEvent;