我查看了谷歌的AdMob网站,我只想要一个列表,列出我可以用于横幅广告和插页式广告的所有内置功能。
例如。 adViewDidReceiveAd() interstitialDidDismissScreen()
如果有人知道我在哪里可以找到这个,请告诉我。
答案 0 :(得分:1)
这是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
才能使用它。(不要忘记将您的interstitlal的代理设置为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 test:GADInterstitialDelegate {}