[iOS] Fixed AdBanner after cherry-pick from release-96

This commit is contained in:
Alexander Boriskov 2020-03-13 13:11:28 +03:00 committed by Aleksey Belousov
parent d59a6ca8e6
commit 208a3e4d87

View file

@ -173,7 +173,7 @@ class AdBannerView: UIView {
adCallToActionButtonDetailed.isHighlighted = highlighted;
}
private func configFBBanner(ad: FBNativeAd) {
private func configFBBanner(ad: FBNativeBannerAd) {
adType = .native
DAAImageWidth.constant = adPrivacyImage.width;
DAAImage.isHidden = false;
@ -185,7 +185,6 @@ class AdBannerView: UIView {
adCallToActionButtons = [adCallToActionButtonCompact, adCallToActionButtonDetailed]
}
ad.registerView(forInteraction: self,
mediaView: FBMediaView(),
iconImageView: adIconImageView,
viewController: UIViewController.topViewController(),
clickableViews: adCallToActionButtons)
@ -232,7 +231,7 @@ class AdBannerView: UIView {
adCallToActionButtons = [adCallToActionButtonCompact, adCallToActionButtonDetailed]
adCallToActionButtons.forEach { $0.setTitle(ad.ctaText, for: .normal) }
}
mpNativeAd?.setAdView(self, actionButtons: adCallToActionButtons)
mpNativeAd?.setAdView(self, iconView: adIconImageView, actionButtons: adCallToActionButtons)
adTitleLabel.attributedText = attributedTitle(title: ad.title,
indent: adPrivacyImage.width + DAAImageWidth.constant)