我收到此错误:
2016-05-11 17:07:43.496 Inspire[2265:1045224] <Google>
You must set the rootViewController property of
<GADBannerView: 0x136586cb0; frame = (47 0; 320 50);
clipsToBounds = YES; autoresize = RM+BM; layer =
<CALayer: 0x1365876b0>> before loading a request.
我的GADBannerView
根本没有出现。
如何解决此问题以使其加载?
感谢。
答案 0 :(得分:2)
想出来。把这个
print("Google Mobile Ads SDK version: \(GADRequest.sdkVersion())")
bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
self.bannerView.rootViewController = self;
let request: GADRequest = GADRequest()
self.bannerView.loadRequest(request)
在你的admob adbanner的代码中
replaceAll()