adDidDismissFullScreenContent - 如何确定广告是插页式广告还是奖励式广告?

adDidDismissFullScreenContent - How do you determine if the ad was an Interstitial or Rewarded?

我正在使用 Google AdMob v8 在同一视图控制器中实施插页式广告和激励广告。

我需要能够确定哪个广告被关闭,以便我可以正确加载另一个。

func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) 
    
    loadRewarded()
    loadInterstitial()
}

无论关闭哪个广告,我的上述进度都在加载奖励广告和插页式广告。

如何确定关闭了哪个广告(插页式广告或奖励广告)?

func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) 
    
    print("Ad dismiss full screen ad")
    if type(of: ad) == GADInterstitialAd.self {
      print("InterstitialAd")
    }else if  type(of: ad) == GADRewardedAd.self {
      print("RewardedAd")
    }
}