GADCustomEventBanner

@protocol GADCustomEventBanner <NSObject>

The banner custom event protocol. Your banner custom event handler must implement this protocol.

  • Inform |delegate| with the custom event execution results to ensure mediation behaves correctly.

    In your class, define the -delegate and -setDelegate: methods or use @synthesize delegate. The Google Mobile Ads SDK sets this property on instances of your class.

    Declaration

    Swift

    weak var delegate: GADCustomEventBannerDelegate? { get set }

    Objective-C

    @property (readwrite, nonatomic, nullable) id<GADCustomEventBannerDelegate>
        delegate;
  • Called by mediation when your custom event is scheduled to be executed. Report execution results to the delegate.

    Declaration

    Swift

    func requestAd(_ adSize: GADAdSize, parameter serverParameter: String?, label serverLabel: String?, request: GADCustomEventRequest)

    Objective-C

    - (void)requestBannerAd:(GADAdSize)adSize
                  parameter:(NSString *_Nullable)serverParameter
                      label:(NSString *_Nullable)serverLabel
                    request:(nonnull GADCustomEventRequest *)request;

    Parameters

    adSize

    The size of the ad as configured in the mediation UI for the mediation placement.

    serverParameter

    Parameter configured in the mediation UI.

    serverLabel

    Label configured in the mediation UI.

    request

    Contains ad request information.