FLBannerViewDelegate

public protocol FLBannerViewDelegate : AnyObject

FLBannerViewDelegate defines methods you can implement to receive life-cycle information about a TDBannerView.

  • Sent when TDBannerView presents an ad. This is a good opportunity to show, add to hierarchy, or animate the banner if it has not been displayed yet.

    Declaration

    Swift

    func bannerViewDidPresentAd(_ bannerView: FLBannerView)

    Parameters

    bannerView

    The banner that presented an ad.

  • Sent if a TDBannerView failed to present an ad. Normally, it happens if there’s no ad available (no inventory) to be displayed.

    Declaration

    Swift

    func bannerView(_ bannerView: FLBannerView, didFailToPresentAdWithError error: FLError)

    Parameters

    bannerView

    The TDBannerView that failed to present an ad.

    error

    The error that occurred during loading. The error codes are available in FLAdLoader.h.

  • Sent when the user clicked on the banner view.

    Declaration

    Swift

    func bannerViewDidClick(_ bannerView: FLBannerView, clickThroughUrl: URL)

    Parameters

    bannerView

    The banner that will leave the application.

    clickThroughUrl

    The url that needs to be redirected to