From 54dc8d5a827bfccbb8917afe6d970fa757437423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Hast=C3=BCrk?= Date: Fri, 16 Oct 2020 14:11:36 +0300 Subject: [PATCH] fix deprecated usages --- .../AdManagerCustomRenderingExample/ViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Swift/admanager/AdManagerCustomRenderingExample/AdManagerCustomRenderingExample/ViewController.swift b/Swift/admanager/AdManagerCustomRenderingExample/AdManagerCustomRenderingExample/ViewController.swift index 5ca94e64..fba99158 100644 --- a/Swift/admanager/AdManagerCustomRenderingExample/AdManagerCustomRenderingExample/ViewController.swift +++ b/Swift/admanager/AdManagerCustomRenderingExample/AdManagerCustomRenderingExample/ViewController.swift @@ -55,7 +55,7 @@ class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - versionLabel.text = GADRequest.sdkVersion() + versionLabel.text = GADMobileAds.sharedInstance().sdkVersion refreshAd(nil) } @@ -259,11 +259,11 @@ extension ViewController: GADNativeCustomTemplateAdLoaderDelegate { "SimpleCustomNativeAdView", owner: nil, options: nil)!.first as! MySimpleNativeAdView setAdView(customNativeAdView) - let hasVideoContent = nativeCustomTemplateAd.videoController.hasVideoContent() + let hasVideoContent = nativeCustomTemplateAd.mediaContent.hasVideoContent // Update the ViewController for video content. updateVideoStatusLabel(hasVideoContent: hasVideoContent) if hasVideoContent { - nativeCustomTemplateAd.videoController.delegate = self + nativeCustomTemplateAd.mediaContent.videoController.delegate = self } // Populate the custom native ad view with the custom native ad assets. customNativeAdView.populate(withCustomNativeAd: nativeCustomTemplateAd)