开发者

<Google> Must set the rootViewController property of GADBannerView before calling loadRequest:

开发者 https://www.devze.com 2023-03-22 00:39 出处:网络
I use Google AdMob SDK in my iPhone app, I did set the rootViewController property, delegate property

I use Google AdMob SDK in my iPhone app, I did set the rootViewController property, delegate property

self.adBannerView.rootViewController = basedViewController;
self.adBannerView.delegate = basedViewController;
[self.adBannerView loadRequest:[GADRequest request]];

开发者_如何学JAVAbut keep getting this message while running the app:

<Google> Must set the rootViewController property of GADBannerView before calling loadRequest:

I manage 3 GADBannerView at the same time, do you know the status of GADBannerView (does it have rootViewController set or not) while debugging the app?


I think the basedViewController is not created yet. Step 1) Create the viewcontroler Step 2) Assign


Use your code at end of View Did Load on your viewcontroller.m

0

精彩评论

暂无评论...
验证码 换一张
取 消