BannerViewDelegate

@objc
public protocol BannerViewDelegate : NSObjectProtocol

A protocol for handling events related to banner ads in the PBM SDK.

This protocol defines methods and properties for managing events associated with banner ads, including loading events, user interactions, and ad sizes. Implementing this protocol allows for custom handling of these events within the PBM SDK.

  • Asks the delegate for a view controller instance to use for presenting modal views as a result of user interaction on an ad. Usual implementation may simply return self, if it is view controller class.

    Declaration

    Swift

    func bannerViewPresentationController() -> UIViewController?
  • Notifies the delegate that an ad has been successfully loaded and rendered.

    Declaration

    Swift

    @objc
    optional func bannerView(_ bannerView: BannerView, didReceiveAdWithAdSize adSize: CGSize)

    Parameters

    bannerView

    The BannerView instance sending the message.

  • Notifies the delegate of an error encountered while loading or rendering an ad.

    Declaration

    Swift

    @objc
    optional func bannerView(_ bannerView: BannerView,
                             didFailToReceiveAdWith error: Error)

    Parameters

    bannerView

    The BannerView instance sending the message.

    error

    The error encountered while attempting to receive or render the

  • Notifies the delegate whenever current app goes in the background due to user click.

    Declaration

    Swift

    @objc
    optional func bannerViewWillLeaveApplication(_ bannerView: BannerView)

    Parameters

    bannerView

    The BannerView instance sending the message.

  • Notifies delegate that the banner view will launch a modal on top of the current view controller, as a result of user interaction.

    Declaration

    Swift

    @objc
    optional func bannerViewWillPresentModal(_ bannerView: BannerView)
  • Notifies delegate that the banner view has dismissed the modal on top of the current view controller.

    Declaration

    Swift

    @objc
    optional func bannerViewDidDismissModal(_ bannerView: BannerView)

    Parameters

    bannerView

    The BannerView instance sending the message.