SliderAd

@objc(YMASliderAd)
@MainActor
public protocol SliderAd

Undocumented

  • An object implementing the SliderAdDelegate protocol that receives events triggered by the user’s interaction with the ad.

    Declaration

    Swift

    @MainActor
    var delegate: SliderAdDelegate? { get set }
  • ads

    An array with nested ads.

    Declaration

    Swift

    @MainActor
    var ads: [NativeAd] { get }
  • Information about the ad.

    Declaration

    Swift

    @MainActor
    var adInfo: AdInfo? { get }
  • Loads images if manual loading is selected.

    Warning

    All images are cached, but they can be deleted at any time, so you need to call this method before every ad impression.

    Declaration

    Swift

    @MainActor
    func loadImages(completionHandler: (@MainActor () -> Void)?)

    Parameters

    completionHandler

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

  • Sets values of all ad assets to native ad view, installs impression and click handlers.

    Declaration

    Swift

    @objc(bindWithAdView:error:)
    @MainActor
    func bind(with adView: NativeAdView) throws

    Parameters

    adView

    NativeAdView with views for ad assets.

    error

    Binding error.

    Return Value

    true if binding succeeded, otherwise false.

  • loadImages() Extension method

    Loads images if manual loading is selected.

    Warning

    All images are cached, but they can be deleted at any time, so you need to call this method before every ad impression.

    Declaration

    Swift

    @MainActor
    func loadImages()
  • loadImages() Extension method, asynchronous

    Asynchronously loads images if manual loading is selected.

    Warning

    All images are cached, but they can be deleted at any time, so you need to call this method before every ad impression.

    Declaration

    Swift

    @MainActor
    func loadImages() async