Je veux mettre en œuvre iAd à mon application Swift avec ce code:Mettre en œuvre iAd dans l'application Swift
bannerView = ADBannerView(adType: .banner)
bannerView.translatesAutoresizingMaskIntoConstraints = false
bannerView.delegate = self
bannerView.isHidden = true
view.addSubview(bannerView)
let viewsDictionary = ["bannerView": bannerView]
view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[bannerView]|", options: [], metrics: nil, views: viewsDictionary))
view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[bannerView]|", options: [], metrics: nil, views: viewsDictionary))
mais dans les view.addContraints
lignes est cette erreur:
Cannot convert value of type '[String : ADBannerView?]' to expected argument type '[String : AnyObject]
Je ne suis pas sûr de ce que faire.
iAd est terminé. Apple ne le supporte plus. – rmaddy
iAd est en cours de suppression: http://stackoverflow.com/q/37337262/2108547 –