1
我剛將Chartboost應用到了我的所有快速應用程序中。目標C Swift中的代表
我已獎勵插頁式廣告。所以我需要使用Chartboost給我的目標C函數來設置一個委託。我無法弄清楚如何去做。這就是我通過Swift做Admob的方式。
NSNotificationCenter.defaultCenter().addObserver(self, selector: "presentInterstitial:", name: "AdMobCall", object: nil)
func presentInterstitial(sender:UIButton!) {
if let isReady = interstitial?.isReady { // _ isReady
interstitial?.presentFromRootViewController(self)
}
}
NSNotificationCenter.defaultCenter().postNotificationName("AdMobCall", object: nil)
但目標C Chartboost功能我給定爲:
- (無效)didCompleteRewardedVideo:(CBLocation)位置 withReward:(INT)獎勵;
我不明白如何使用此功能爲Admob創建相同的代理。這似乎不可能。我有Chartboost獎勵intersitials工作。但我無法設置代表,看他們是否觀看了視頻完成與否。