NativeAdDelegate
@objc(YMANativeAdDelegate)
public protocol NativeAdDelegate : NSObjectProtocol
Undocumented
-
UIViewController
object that is used for showing a modal controller in response to the user’s interaction with the banner.Declaration
Swift
@objc optional func viewControllerForPresentingModalView() -> UIViewController?
Return Value
UIViewController
object that is used for showing a modal controller in response to the user’s interaction with the banner. -
Notifies that the user has clicked on the ad.
Declaration
Swift
@objc optional func nativeAdDidClick(_ ad: NativeAd)
Parameters
ad
A reference to the object that invoked the method.
-
Notifies that the user switched from the ad to an app (for example, the browser).
Declaration
Swift
@objc optional func nativeAdWillLeaveApplication(_ ad: NativeAd)
Parameters
ad
A reference to the object that invoked the method.
-
Notifies that the ad will show the modal
UIViewController
in response to the user interacting with the banner.Declaration
Swift
@objc optional func nativeAd(_ ad: NativeAd, willPresentScreen viewController: UIViewController?)
Parameters
ad
A reference to the object that invoked the method.
viewController
Modal
UIViewController
. -
Notifies that the ad finished showing the modal
UIViewController
in response to the user interacting with the banner.Declaration
Swift
@objc optional func nativeAd(_ ad: NativeAd, didDismissScreen viewController: UIViewController?)
Parameters
ad
A reference to the object that invoked the method.
viewController
Modal
UIViewController
. -
Notifies delegate when an impression was tracked.
Declaration
Swift
@objc(nativeAd:didTrackImpressionWithData:) optional func nativeAd(_ ad: NativeAd, didTrackImpressionWith impressionData: ImpressionData?)
Parameters
ad
A reference to the object that invoked the method.
impressionData
Ad impression-level revenue data
-
Notifies that the user has chosen a reason for closing the ad and the ad must be hidden.
Warning
Advertising will not be hidden. The developer must determine what to do with the ad after the reason for closing it is chosen.Declaration
Swift
@objc(closeNativeAd:) optional func close(_ ad: NativeAd)
Parameters
ad
A reference to the object that invoked the method.