NativeBannerView

@objc(YMANativeBannerView)
@objcMembers
public class NativeBannerView : UIView

This class is a template for native advertising layout.

  • ad

    Loaded ad.

    Declaration

    Swift

    public var ad: NativeAd? { get set }
  • Undocumented

    Declaration

    Swift

    public convenience init()
  • Undocumented

    Declaration

    Swift

    override public init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    override public func encode(with coder: NSCoder)
  • Applies the appearance settings from the template.

    Declaration

    Swift

    @objc(applyAppearance:)
    public func apply(_ appearance: NativeTemplateAppearance)

    Parameters

    appearance

    Appearance of the ad.

  • Calculates the height of the ad.

    Declaration

    Swift

    @objc(heightWithAd:width:appearance:)
    public static func height(
        with ad: NativeAd,
        width: CGFloat,
        appearance: NativeTemplateAppearance?
    ) -> CGFloat

    Parameters

    ad

    Loaded ad.

    width

    The width of the ad.

    appearance

    Appearance of the ad.

    Return Value

    Returns the height of the ad.