我需要一份 AdMob 函数列表 SWIFT
I need a list of AdMob Functions SWIFT
我浏览了 google 的 AdMob 网站,我只想要一份可用于横幅广告和插页式广告的所有内置功能的列表。
例如。 adViewDidReceiveAd() interstitialDidDismissScreen()
如果有人知道我在哪里可以找到这个,请告诉我。
这是 bannerView 函数,您必须在其中实现 GADBannerViewDelegate
才能使用它(不要忘记将横幅的委托设置为 myBanner.delegate = self
,这样它们就会被调用)。
func adViewDidReceiveAd(bannerView: GADBannerView!) {
}
func adViewDidDismissScreen(bannerView: GADBannerView!) {
}
func adViewWillDismissScreen(bannerView: GADBannerView!) {
}
func adViewWillPresentScreen(bannerView: GADBannerView!) {
}
func adViewWillLeaveApplication(bannerView: GADBannerView!) {
}
func adView(bannerView: GADBannerView!, didFailToReceiveAdWithError error: GADRequestError!) {
}
对于间隙代理,您需要实施 GADInterstitialDelegate
才能使用它。(不要忘记将间隙代理设置为 interstitial.delegate = self
,这样它们就会被调用)。
func interstitialDidReceiveAd(ad: GADInterstitial!) {
}
func interstitialDidDismissScreen(ad: GADInterstitial!) {
}
func interstitialWillDismissScreen(ad: GADInterstitial!) {
}
func interstitialWillPresentScreen(ad: GADInterstitial!) {
}
func interstitialWillLeaveApplication(ad: GADInterstitial!) {
}
func interstitial(ad: GADInterstitial!, didFailToReceiveAdWithError error: GADRequestError!) {
}
在 class 声明后实现这些,例如:class test:GADInterstitialDelegate {}
我浏览了 google 的 AdMob 网站,我只想要一份可用于横幅广告和插页式广告的所有内置功能的列表。
例如。 adViewDidReceiveAd() interstitialDidDismissScreen()
如果有人知道我在哪里可以找到这个,请告诉我。
这是 bannerView 函数,您必须在其中实现 GADBannerViewDelegate
才能使用它(不要忘记将横幅的委托设置为 myBanner.delegate = self
,这样它们就会被调用)。
func adViewDidReceiveAd(bannerView: GADBannerView!) {
}
func adViewDidDismissScreen(bannerView: GADBannerView!) {
}
func adViewWillDismissScreen(bannerView: GADBannerView!) {
}
func adViewWillPresentScreen(bannerView: GADBannerView!) {
}
func adViewWillLeaveApplication(bannerView: GADBannerView!) {
}
func adView(bannerView: GADBannerView!, didFailToReceiveAdWithError error: GADRequestError!) {
}
对于间隙代理,您需要实施 GADInterstitialDelegate
才能使用它。(不要忘记将间隙代理设置为 interstitial.delegate = self
,这样它们就会被调用)。
func interstitialDidReceiveAd(ad: GADInterstitial!) {
}
func interstitialDidDismissScreen(ad: GADInterstitial!) {
}
func interstitialWillDismissScreen(ad: GADInterstitial!) {
}
func interstitialWillPresentScreen(ad: GADInterstitial!) {
}
func interstitialWillLeaveApplication(ad: GADInterstitial!) {
}
func interstitial(ad: GADInterstitial!, didFailToReceiveAdWithError error: GADRequestError!) {
}
在 class 声明后实现这些,例如:class test:GADInterstitialDelegate {}