BannerAdView
@objc(YMABannerAdView)
@objcMembers
@MainActor
public class BannerAdView : UIView
This class is responsible for setting up and displaying the banner.
-
Information about the ad.
Declaration
Swift
@MainActor public var adInfo: AdInfo? { get } -
It monitors the ad and receives notifications about user interaction with the ad.
Remark
It provides data necessary for displaying the ad (for example, aUIViewControllerobject thatBannerAdViewuses to show a modal controller in response to the user interacting with the banner).Declaration
Swift
@MainActor public weak var delegate: BannerAdViewDelegate? -
Initializes an object of the
BannerAdViewclass to display the banner with the specified size.Declaration
Swift
@MainActor public convenience init(adSize: BannerAdSize)Parameters
adSizeThe size of the banner. The size of the banner is set in the
BannerAdSizeclass.
-
Displays the banner centered at the top of the passed
View.Declaration
Swift
@objc(displayAtTopInView:) @MainActor public func displayAtTop(in view: UIView)Parameters
viewObject of the
UIViewclass to add the banner to. -
Displays the banner centered at the bottom of the passed
View.Declaration
Swift
@objc(displayAtBottomInView:) @MainActor public func displayAtBottom(in view: UIView)Parameters
viewAn object of the
UIViewclass to add the banner to. -
Loads a banner with the specified targeting data.
Declaration
Swift
@objc(loadAdWithRequest:) @MainActor public func loadAd(with request: AdRequest)Parameters
requestData for targeting.
-
Returns the size of the banner content.
Declaration
Swift
@MainActor public func adContentSize() -> CGSizeReturn Value
The size of the banner content.
-
Undocumented
Declaration
Swift
@MainActor override var intrinsicContentSize: CGSize { get } -
Undocumented
Declaration
Swift
@MainActor override func didMoveToSuperview() -
Undocumented
Declaration
Swift
@MainActor override func point(inside point: CGPoint, with event: UIEvent?) -> Bool