BannerAdViewDelegate
@objc(YMABannerAdViewDelegate)
@MainActor
public protocol BannerAdViewDelegate : NSObjectProtocol
The protocol defines the methods of a delegate that monitors the ads.
Remark
Methods are called by an object of theBannerAdView class when its state changes.
-
Notifies that the banner is loaded.
Remark
At this time, you can addBannerAdViewif you haven’t done so yet.Declaration
Swift
@objc @MainActor func bannerAdViewDidLoad(_ bannerAdView: BannerAdView)Parameters
bannerAdViewA reference to the object of the
BannerAdViewclass that invoked the method. -
Notifies that the banner failed to load.
Declaration
Swift
@objc @MainActor func bannerAdViewDidFailLoading(_ bannerAdView: BannerAdView, error: Error)Parameters
bannerAdViewA reference to the object of the
BannerAdViewclass that invoked the method.errorInformation about the error.
-
Notifies that the user has clicked on the banner.
Declaration
Swift
@objc @MainActor func bannerAdViewDidClick(_ bannerAdView: BannerAdView)Parameters
bannerAdViewA reference to the object of the
BannerAdViewclass that invoked the method. -
Notifies delegate when an impression was tracked.
Declaration
Swift
@objc(bannerAdView:didTrackImpressionWithData:) @MainActor func bannerAdView(_ bannerAdView: BannerAdView, didTrackImpression impressionData: ImpressionData?)Parameters
bannerAdViewA reference to the object of the
BannerAdViewclass that invoked the method.impressionDataAd impression-level revenue data.