YMANativeAdLoaderDelegate

Objective-C

@protocol YMANativeAdLoaderDelegate <NSObject>

Swift

protocol YMANativeAdLoaderDelegate : NSObjectProtocol

The protocol defines the methods of a delegate that tracks the ad loading process. The methods are invoked by an object of the YMANativeAdLoader class.

  1. Methods
  2. -nativeAdLoader:didLoadAd:
  3. -nativeAdLoader:didFailLoadingWithError:

Methods

-nativeAdLoader:didLoadAd:

Notifies that an ad is loaded.

Declaration

Objective-C

- (void)nativeAdLoader:(nonnull YMANativeAdLoader *)loader
             didLoadAd:(nonnull id<YMANativeAd>)ad;

Parameters

loader

The loader that sends the message.

ad

Native ads that are ready to be displayed.

loader

The loader that sends the message.

ad

Native ads that are ready to be displayed.

-nativeAdLoader:didFailLoadingWithError:

Notifies that the ad failed to load.

Declaration

Objective-C

- (void)nativeAdLoader:(nonnull YMANativeAdLoader *)loader
    didFailLoadingWithError:(nonnull NSError *)error;

Swift

optional func nativeAdLoader(_ loader: YMANativeAdLoader, didFailLoadingWithError error: Error)

Parameters

loader

The loader that sends the message (YMANativeAdLoader).

error

Information about the error (for details, see YMAAdErrorCode).

loader

The loader that sends the message (YMANativeAdLoader).

error

Information about the error (for details, see YMAAdErrorCode).