NimbusAdView

final class NimbusAdView
extension NimbusAdView : AdController, AdControllerDelegate, CALayerDelegate, CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, NSCoding, NSObjectProtocol, UIAccessibilityIdentification, UIActivityItemsConfigurationProviding, UIAppearance, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusEnvironment, UIFocusItem, UIFocusItemContainer, UILargeContentViewerItem, UIPasteConfigurationSupporting, UIPopoverPresentationControllerSourceItem, UIResponderStandardEditActions, UITraitEnvironment, UIUserActivityRestoring
extension NimbusAdView : AdController, AdControllerDelegate, CALayerDelegate, CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, NSCoding, NSObjectProtocol, Sendable, UIAccessibilityIdentification, UIActivityItemsConfigurationProviding, UIAppearance, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusEnvironment, UIFocusItem, UIFocusItemContainer, UILargeContentViewerItem, UIPasteConfigurationSupporting, UIPopoverPresentationControllerSourceItem, UIResponderStandardEditActions, UITraitEnvironment, UIUserActivityRestoring

Nimbus ad view that can render video and static ads

  • Undocumented

    Declaration

    Swift

    static let closeButton: String?
  • Delegate for the Nimbus ad view

    Declaration

    Swift

    weak var delegate: AdControllerDelegate?
  • Ad volume (0-100). Defaults to 0.

    Declaration

    Swift

    var volume: Int { get set }
  • Friendly obstructions for OM

    Declaration

    Swift

    var friendlyObstructions: [UIView]?
  • Tracks ad viewability via OM

    Declaration

    Swift

    var viewabilityTracker: AdViewabilityTracker?
  • Whether SKOverlay should be shown if possible. Defaults to Nimbus.shared.isSKOverlayEnabledForAllUnits

    Declaration

    Swift

    var showsSKOverlay: Bool
  • Undocumented

    Declaration

    Swift

    var exposure: NimbusViewExposure { get }
  • The view controller containing the Nimbus ad view

    Declaration

    Swift

    weak var adPresentingViewController: UIViewController?
  • Initializes a NimbusAdView

    • lockOrientation: Lock the orientation of the ad. Default: nil (the ad view accounts for orientation changes)
    • adPresentingViewController: The view controller containing the Nimbus ad view
    • viewabilityTrackable: EXPERIMENTAL: Tracks ad viewability via OM

    Declaration

    Swift

    init(lockOrientation: UIDeviceOrientation? = nil, adPresentingViewController: UIViewController?, viewabilityTrackerBuilder: AdViewabilityTrackerBuilder? = Nimbus.shared.viewabilityProvider?.trackerBuilder)
  • Undocumented

    Declaration

    Swift

    override func layoutSubviews()
  • Undocumented

    Declaration

    Swift

    func updateFriendlyObstructions()
  • This method should not be called frequently (in a loop, timer, etc.) as it forces to run the exposure calculation which is otherwise scheduled to run every 200ms on its own. You may call this method in a use-case where you need the current exposure value and can’t rely on the one from the last calculation (up to 200ms old).

    Declaration

    Swift

    func forceUpdateVisibility()
  • Render an ad with the given response.

    Declaration

    Swift

    func render(ad: NimbusAd, companionAd: NimbusCompanionAd? = nil)
  • Duration of the current ad

    Declaration

    Swift

    var adDuration: CGFloat { get }
  • Ad view associated with the ad. This returns the NimbusAdView itself

    Declaration

    Swift

    var adView: UIView? { get }
  • Start the ad

    Declaration

    Swift

    func start()
  • Stop/pause the ad

    Declaration

    Swift

    func stop()
  • Destroy the nimbus ad view

    Declaration

    Swift

    func destroy()
  • Notification of NimbusAdView’s exposure change

    Declaration

    Swift

    func didExposureChange(exposure: NimbusViewExposure)