BannerView
@objcMembers
public class BannerView:
UIView,
BannerAdLoaderDelegate,
AdLoadFlowControllerDelegate,
BannerEventInteractionDelegate,
DisplayViewInteractionDelegate
The view that will display the particular banner ad. Built for rendering type of integration.
-
The ad unit configuration.
Declaration
Swift
public let adUnitConfig: AdUnitConfig
-
The event handler for banner view events.
Declaration
Swift
public let eventHandler: BannerEventHandler?
-
Banner-specific parameters.
Declaration
Swift
public var bannerParameters: BannerParameters { get }
-
Video-specific parameters.
Declaration
Swift
public var videoParameters: VideoParameters { get }
-
The last bid response received.
Declaration
Swift
public var lastBidResponse: BidResponse? { get }
-
ID of Stored Impression on the Prebid server
Declaration
Swift
public var configID: String { get }
-
The interval for refreshing the ad.
Declaration
Swift
public var refreshInterval: TimeInterval { get set }
-
Additional sizes for the ad.
Declaration
Swift
public var additionalSizes: [CGSize]? { get set }
-
The ad format (e.g., banner, video).
Declaration
Swift
public var adFormat: AdFormat { get set }
-
The position of the ad on the screen.
Declaration
Swift
public var adPosition: AdPosition { get set }
-
Undocumented
Declaration
Swift
@objc public var ortbConfig: String? { get set }
-
ORTB configuration string.
Declaration
Swift
public weak var delegate: BannerViewDelegate?
-
Initializes a new
BannerView
.Declaration
Swift
public init( frame: CGRect, configID: String, adSize: CGSize, eventHandler: BannerEventHandler )
Parameters
frame
The frame rectangle for the view.
configID
The configuration ID for the ad unit.
adSize
The size of the ad.
eventHandler
The event handler for the banner view.
-
Convenience initializer for creating a
BannerView
with a configuration ID and event handler.Declaration
Swift
public convenience init( configID: String, eventHandler: BannerEventHandler )
Parameters
configID
The configuration ID for the ad unit.
eventHandler
The event handler for the banner view.
-
Convenience initializer for creating a
BannerView
with a frame, configuration ID, and ad size.Declaration
Swift
public convenience init( frame: CGRect, configID: String, adSize: CGSize )
Parameters
frame
The frame rectangle for the view.
configID
The configuration ID for the ad unit.
adSize
The size of the ad.
-
Loads the ad for the banner view.
Declaration
Swift
public func loadAd()
-
Sets the stored auction response.
Declaration
Swift
public func setStoredAuctionResponse(storedAuction: String)
Parameters
storedAuction
The stored auction response string.
-
Sets the impression-level OpenRTB configuration string for the ad unit.
Declaration
Swift
@objc public func setImpORTBConfig(_ ortbConfig: String?)
Parameters
ortbObject
The impression-level OpenRTB configuration string to set. Can be
nil
to clear the configuration. -
Returns the impression-level OpenRTB configuration string.
Declaration
Swift
@objc public func getImpORTBConfig() -> String?
-
Stops the auto-refresh of the ad.
Declaration
Swift
public func stopRefresh()
-
Subscribe to plugin renderer events
Declaration
Swift
public func setPluginEventDelegate(_ pluginEventDelegate: PluginEventDelegate)
-
Adds context data for a specified key.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use addExtData method instead.") public func addContextData(_ data: String, forKey key: String)
Parameters
data
The data to add.
key
The key associated with the data.
-
Updates context data for a specified key.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use updateExtData method instead.") public func updateContextData(_ data: Set<String>, forKey key: String)
Parameters
data
A set of data to update.
key
The key associated with the data.
-
Removes context data for a specified key.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use removeExtData method instead.") public func removeContextDate(forKey key: String)
Parameters
key
The key associated with the data to remove.
-
Clears all context data.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use clearExtData method instead.") public func clearContextData()
-
Adds ext data.
Declaration
Swift
public func addExtData(key: String, value: String)
Parameters
key
The key for the data.
value
The value for the data.
-
Updates ext data.
Declaration
Swift
public func updateExtData(key: String, value: Set<String>)
Parameters
key
The key for the data.
value
The value for the data.
-
Removes ext data.
Declaration
Swift
public func removeExtData(forKey: String)
Parameters
key
The key for the data.
-
Clears ext data.
Declaration
Swift
public func clearExtData()
-
Adds a context keyword.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use addExtKeyword method instead.") public func addContextKeyword(_ newElement: String)
Parameters
newElement
The keyword to add.
-
Adds a set of context keywords.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use addExtKeywords method instead.") public func addContextKeywords(_ newElements: Set<String>)
Parameters
newElements
A set of keywords to add.
-
Removes a context keyword.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use removeExtKeyword method instead.") public func removeContextKeyword(_ element: String)
Parameters
element
The keyword to remove.
-
Clears all context keywords.
Declaration
Swift
@available(*, deprecated, message: "This method is deprecated. Please, use clearExtKeywords method instead.") public func clearContextKeywords()
-
Adds an extended keyword.
Declaration
Swift
public func addExtKeyword(_ newElement: String)
Parameters
newElement
The keyword to be added.
-
Adds multiple extended keywords.
Declaration
Swift
public func addExtKeywords(_ newElements: Set<String>)
Parameters
newElements
A set of keywords to be added.
-
Removes an extended keyword.
Declaration
Swift
public func removeExtKeyword(_ element: String)
Parameters
element
The keyword to be removed.
-
Clears all extended keywords.
Declaration
Swift
public func clearExtKeywords()
-
Sets the app content data.
Declaration
Swift
public func setAppContent(_ appContent: PBMORTBAppContent)
Parameters
appContent
The app content data.
-
Clears the app content data.
Declaration
Swift
public func clearAppContent()
-
Adds app content data objects.
Declaration
Swift
public func addAppContentData(_ dataObjects: [PBMORTBContentData])
Parameters
dataObjects
The data objects to be added.
-
Removes an app content data object.
Declaration
Swift
public func removeAppContentDataObject(_ dataObject: PBMORTBContentData)
Parameters
dataObject
The data object to be removed.
-
Clears all app content data objects.
Declaration
Swift
public func clearAppContentDataObjects()
-
Adds user data objects.
Declaration
Swift
public func addUserData(_ userDataObjects: [PBMORTBContentData])
Parameters
userDataObjects
The user data objects to be added.
-
Removes a user data object.
Declaration
Swift
public func removeUserData(_ userDataObject: PBMORTBContentData)
Parameters
userDataObject
The user data object to be removed.
-
Clears all user data objects.
Declaration
Swift
public func clearUserData()
-
Declaration
Swift
public func trackImpression(forDisplayView: UIView)
-
Declaration
Swift
public func viewControllerForModalPresentation( fromDisplayView: UIView ) -> UIViewController?
-
Declaration
Swift
public func didLeaveApp(from displayView: UIView)
-
Declaration
Swift
public func willPresentModal(from displayView: UIView)
-
Declaration
Swift
public func didDismissModal(from displayView: UIView)
-
Undocumented
Declaration
Swift
public func bannerAdLoader( _ bannerAdLoader: PBMBannerAdLoader, loadedAdView adView: UIView, adSize: CGSize )
-
Undocumented
Declaration
Swift
public func adLoadFlowController( _ adLoadFlowController: PBMAdLoadFlowController, failedWithError error: Error? )
-
Undocumented
Declaration
Swift
public func adLoadFlowControllerWillSendBidRequest(_ adLoadFlowController: PBMAdLoadFlowController)
-
Undocumented
Declaration
Swift
public func adLoadFlowControllerWillRequestPrimaryAd(_ adLoadFlowController: PBMAdLoadFlowController)
-
Undocumented
Declaration
Swift
public func adLoadFlowControllerShouldContinue(_ adLoadFlowController: PBMAdLoadFlowController) -> Bool
-
Undocumented
Declaration
Swift
public func willPresentModal()
-
Undocumented
Declaration
Swift
public func didDismissModal()
-
Undocumented
Declaration
Swift
public func willLeaveApp()
-
Undocumented
Declaration
Swift
public var viewControllerForPresentingModal: UIViewController? { get }