NativeAdLoaderDelegate

@objc(YMANativeAdLoaderDelegate)
public protocol NativeAdLoaderDelegate : NSObjectProtocol

The protocol defines the methods of a delegate that monitors the ad loading process.

Remark

The methods are invoked by an object of the NativeAdLoader class.
  • Notifies that a native ad is loaded.

    Declaration

    Swift

    @objc(nativeAdLoader:didLoadAd:)
    func nativeAdLoader(_ loader: NativeAdLoader, didLoad ad: NativeAd)

    Parameters

    loader

    The loader that sends the message.

    ad

    Native ad that is loaded and ready to be displayed.

  • Notifies that the ad failed to load.

    Declaration

    Swift

    @objc(nativeAdLoader:didFailLoadingWithError:)
    func nativeAdLoader(_ loader: NativeAdLoader, didFailLoadingWithError error: Error)

    Parameters

    loader

    The loader that sends the message.

    error

    Information about the error (for details, see AdErrorCode)