Swift 类型 "SceneName" 不符合协议 ADInterstitialAdDelegate - SK Swift
Swift Type "SceneName" does not conform to protocol ADInterstitialAdDelegate - SK Swift
我无法将 ADInterstitialAdDelegate
添加到我的 class 它说它不符合协议...
import SpriteKit
import AVFoundation
import iAd
var classicHScore: AnyObject? = NSUserDefaults.standardUserDefaults().objectForKey("classicHighscore")
var classicHScoreInt = classicHScore! as Int
var interstitialAd = ADInterstitialAd()
class SpeedGameScene: SKScene, SKPhysicsContactDelegate, ADBannerViewDelegate, ADInterstitialAdDelegate {
不知道为什么我在 google 上找不到答案,但我相信你们中的某个聪明人会找到答案
我正在使用雪碧套件
您忘记添加所需的委托方法。如果出现此类错误,请检查 the documentation of the Delegate 并检查所需的方法。这些方法标有 Required.
class SpeedGameScene: SKScene, SKPhysicsContactDelegate, ADBannerViewDelegate, ADInterstitialAdDelegate {
func interstitialAdDidUnload(interstitialAd: ADInterstitialAd!) {
}
func interstitialAd(interstitialAd: ADInterstitialAd!, didFailWithError error: NSError!) {
}
}
我无法将 ADInterstitialAdDelegate
添加到我的 class 它说它不符合协议...
import SpriteKit
import AVFoundation
import iAd
var classicHScore: AnyObject? = NSUserDefaults.standardUserDefaults().objectForKey("classicHighscore")
var classicHScoreInt = classicHScore! as Int
var interstitialAd = ADInterstitialAd()
class SpeedGameScene: SKScene, SKPhysicsContactDelegate, ADBannerViewDelegate, ADInterstitialAdDelegate {
不知道为什么我在 google 上找不到答案,但我相信你们中的某个聪明人会找到答案
我正在使用雪碧套件
您忘记添加所需的委托方法。如果出现此类错误,请检查 the documentation of the Delegate 并检查所需的方法。这些方法标有 Required.
class SpeedGameScene: SKScene, SKPhysicsContactDelegate, ADBannerViewDelegate, ADInterstitialAdDelegate {
func interstitialAdDidUnload(interstitialAd: ADInterstitialAd!) {
}
func interstitialAd(interstitialAd: ADInterstitialAd!, didFailWithError error: NSError!) {
}
}