From 45eff7cb60a74fb5541ed77a009f50b39e7431c0 Mon Sep 17 00:00:00 2001 From: Nicholas Ventimiglia Date: Thu, 6 Jun 2024 12:51:54 -0700 Subject: [PATCH] Fixed swift native ad "Mute This Ad" sample. PiperOrigin-RevId: 640990767 --- .../APIDemo/AdMobNativeCustomMuteThisAdViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Swift/advanced/APIDemo/APIDemo/AdMobNativeCustomMuteThisAdViewController.swift b/Swift/advanced/APIDemo/APIDemo/AdMobNativeCustomMuteThisAdViewController.swift index de368e49..b2d7359c 100644 --- a/Swift/advanced/APIDemo/APIDemo/AdMobNativeCustomMuteThisAdViewController.swift +++ b/Swift/advanced/APIDemo/APIDemo/AdMobNativeCustomMuteThisAdViewController.swift @@ -18,7 +18,9 @@ import GoogleMobileAds import UIKit /// A controller that demonstrates how to implement the custom Mute This Ad feature. -class AdMobNativeCustomMuteThisAdViewController: UIViewController { +class AdMobNativeCustomMuteThisAdViewController: UIViewController, UIPickerViewDelegate, + UIPickerViewDataSource +{ /// The view that holds the native ad. @IBOutlet var nativeAdPlaceholder: UIView! @@ -64,6 +66,8 @@ class AdMobNativeCustomMuteThisAdViewController: UIViewController { else { assert(false, "Could not load nib file for adView") } + pickerView.delegate = self + pickerView.dataSource = self setAdView(adView) nativeAdView.isHidden = true refreshAd(nil)