SliderAdLoader

@objc(YMASliderAdLoader)
@objcMembers
public final class SliderAdLoader : NSObject, @unchecked Sendable

This class is responsible for loading slider ads.

  • Undocumented

    Declaration

    Swift

    override public convenience init()
  • Loads an ad with the specified targeting data.

    Declaration

    Swift

    public func loadAd(
        with request: AdRequest,
        options: NativeAdOptions = .init(),
        completion: @escaping @MainActor (Result<SliderAd, Error>) -> Void
    )

    Parameters

    request

    Data for targeting.

    options

    Configuration options for native ad loading. Default options load images automatically.

    completion

    The completion handler to be called when the ad loading is finished.

  • loadAd(with:options:) Asynchronous

    Asynchronously loads an ad with the specified targeting data.

    Declaration

    Swift

    public func loadAd(
        with request: AdRequest,
        options: NativeAdOptions = .init()
    ) async throws -> SliderAd

    Parameters

    request

    Data for targeting.

    options

    Configuration options for native ad loading. Default options load images automatically.