在模拟器上运行时获取以下日志。
如果我将它发送给Apple,会不会影响我的应用?或者这只是因为它还没有生存?
2016-02-11 14:55:34.645 PayDay![10691:2267764] [AppDeveloper] ADBannerView:未处理的错误(没有委托或委托不 实现didFailToReceiveAdWithError :):错误Domain = ADErrorDomain 代码= 7"广告已从此横幅中卸载" UserInfo = {ADInternalErrorCode = 7,NSLocalizedFailureReason = Ad is 从此横幅中卸载,ADInternalErrorDomain = ADErrorDomain}
Appdelegate.swift:
import iAd
var UIiAd: ADBannerView = ADBannerView()
... REST OF BASIC STUF
包含广告的一类(设置)
var UIiAd:ADBannerView = ADBannerView()
func appdelegate() -> AppDelegate {
return UIApplication.sharedApplication().delegate as! AppDelegate
}
override func viewWillAppear(animated: Bool) {
UIiAd.delegate = self
UIiAd = self.appdelegate().UIiAd
self.tableView.reloadData()
}
override func viewWillDisappear(animated: Bool) {
UIiAd.delegate = nil
UIiAd.removeFromSuperview()
}
func bannerViewDidLoadAd(banner: ADBannerView!) {
UIView.beginAnimations(nil, context: nil)
UIView.setAnimationDuration(1)
UIiAd.alpha = 1
UIView.commitAnimations()
}
func bannerView(banner: ADBannerView!, didFailToReceiveAdWithError error: NSError!){
UIiAd.hidden = true
}
override func viewDidLoad(){
super.viewDidLoad()
self.canDisplayBannerAds = true
}
ADBannerView
内显示UINavigationController
。