我无法将 ADInterstitialAdDelegate 添加到我的类中,它说它不符合协议(protocol)...
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 {
不知道为什么我在谷歌上找不到答案,但我相信你们中的某个脑残者会找到答案
我正在使用 Sprite 套件
请您参考如下方法:
您忘记添加所需的委托(delegate)方法。如果出现此类错误,请检查 the documentation of the Delegate并检查所需的方法。这些方法标有必需。
class SpeedGameScene: SKScene, SKPhysicsContactDelegate, ADBannerViewDelegate, ADInterstitialAdDelegate {
func interstitialAdDidUnload(interstitialAd: ADInterstitialAd!) {
}
func interstitialAd(interstitialAd: ADInterstitialAd!, didFailWithError error: NSError!) {
}
}
