BannerView
@objcMembers
@MainActor
public class BannerView:
UIView,
BannerEventInteractionDelegate,
DisplayViewInteractionDelegate
The view that will display the particular banner ad. Built for rendering type of integration.
-
The ad unit configuration.
Declaration
Swift
@MainActor public let adUnitConfig: AdUnitConfig -
The event handler for banner view events.
Declaration
Swift
@MainActor public let eventHandler: BannerEventHandler?
-
Banner-specific parameters.
Declaration
Swift
@MainActor public var bannerParameters: BannerParameters { get } -
Video-specific parameters.
Declaration
Swift
@MainActor public var videoParameters: VideoParameters { get } -
The last bid response received.
Declaration
Swift
@MainActor public var lastBidResponse: BidResponse? { get } -
ID of Stored Impression on the Prebid server
Declaration
Swift
@MainActor public var configID: String { get } -
The interval for refreshing the ad.
Declaration
Swift
@MainActor public var refreshInterval: TimeInterval { get set } -
Additional sizes for the ad.
Declaration
Swift
@MainActor public var additionalSizes: [CGSize]? { get set } -
The ad format (e.g., banner, video).
Declaration
Swift
@MainActor public var adFormat: AdFormat { get set } -
The position of the ad on the screen.
Declaration
Swift
@MainActor public var adPosition: AdPosition { get set } -
Undocumented
Declaration
Swift
@MainActor public weak var delegate: BannerViewDelegate? -
Undocumented
Declaration
Swift
@MainActor public weak var videoPlaybackDelegate: BannerViewVideoPlaybackDelegate?
-
Initializes a new
BannerView.Declaration
Swift
@MainActor public init( frame: CGRect, configID: String, adSize: CGSize, eventHandler: BannerEventHandler )Parameters
frameThe frame rectangle for the view.
configIDThe configuration ID for the ad unit.
adSizeThe size of the ad.
eventHandlerThe event handler for the banner view.
-
Convenience initializer for creating a
BannerViewwith a configuration ID and event handler.Declaration
Swift
@MainActor public convenience init( configID: String, eventHandler: BannerEventHandler )Parameters
configIDThe configuration ID for the ad unit.
eventHandlerThe event handler for the banner view.
-
Convenience initializer for creating a
BannerViewwith a frame, configuration ID, and ad size.Declaration
Swift
@MainActor public convenience init( frame: CGRect, configID: String, adSize: CGSize )Parameters
frameThe frame rectangle for the view.
configIDThe configuration ID for the ad unit.
adSizeThe size of the ad.
-
Loads the ad for the banner view.
Declaration
Swift
@MainActor public func loadAd() -
Sets the stored auction response.
Declaration
Swift
@MainActor public func setStoredAuctionResponse(storedAuction: String)Parameters
storedAuctionThe stored auction response string.
-
Sets the impression-level OpenRTB configuration string for the ad unit.
Declaration
Swift
@objc @MainActor public func setImpORTBConfig(_ ortbConfig: String?)Parameters
ortbConfigThe impression-level OpenRTB configuration string to set. Can be
nilto clear the configuration. -
Returns the impression-level OpenRTB configuration string.
Declaration
Swift
@objc @MainActor public func getImpORTBConfig() -> String? -
Sets the global OpenRTB configuration string for the ad unit. It takes precedence over
Targeting.setGlobalOrtbConfig.Declaration
Swift
@MainActor public func setGlobalORTBConfig(_ ortbConfig: String?)Parameters
ortbConfigThe global OpenRTB configuration string to set. Can be
nilto clear the configuration. -
Returns the global OpenRTB configuration string.
Declaration
Swift
@MainActor public func getGlobalORTBConfig() -> String? -
Stops the auto-refresh of the ad.
Declaration
Swift
@MainActor public func stopRefresh()
-
Subscribe to plugin renderer events
Declaration
Swift
@MainActor public func setPluginEventDelegate(_ pluginEventDelegate: PluginEventDelegate)
-
Declaration
Swift
@MainActor public func trackImpression(forDisplayView: UIView) -
Declaration
Swift
@MainActor public func viewControllerForModalPresentation( fromDisplayView: UIView ) -> UIViewController? -
Declaration
Swift
@MainActor public func didLeaveApp(from displayView: UIView) -
Declaration
Swift
@MainActor public func willPresentModal(from displayView: UIView) -
Declaration
Swift
@MainActor public func didDismissModal(from displayView: UIView)
-
Undocumented
Declaration
Swift
@MainActor public func willPresentModal() -
Undocumented
Declaration
Swift
@MainActor public func didDismissModal() -
Undocumented
Declaration
Swift
@MainActor public func willLeaveApp() -
Undocumented
Declaration
Swift
@MainActor public var viewControllerForPresentingModal: UIViewController? { get }