我如何初始化Admob的,并设置子视图 [英] How do I initialize Admob and set the subview

查看:171
本文介绍了我如何初始化Admob的,并设置子视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是相当新的X code,但我有一些麻烦将AdMob的,以我的应用程序。

I'm fairly new to xcode, but i'm having some trouble adding admob to my app.

我遵循Admob的说明,但广告没有显示出来。

I followed the instructions for Admob but the ads are not showing up.

林想我需要补充我创建AdViewController到appsdel​​egate新的观点。是否有一个code我要补充是什么?

Im thinking i need to add the new view i created AdViewController to appsdelegate. Is there a code i should add for that?

BTW:使用的TabBar控制器作为RootViewController的即时通讯

BTW: Im using a tabbar controller as the rootviewcontroller

推荐答案

您需要设置 RootViewController的的UITabBarController ,但你需要的 GADBannerView 对象添加到视图中为所目前正在显示的视图控制器。

You need to set the rootViewController to be the UITabBarController, but you need to add the GADBannerView object into the view for the view Controller that's currently being shown.

有使用自定义UITabBar解决方案<一个例子href="http://$c$c.google.com/p/google-mobile-dev/source/browse/AdCatalog/Classes/AdvancedLayoutUseCases/TabbedViewExample/?repo=adcatalog-ios"相对=nofollow>这里。

There's an example using a custom UITabBar solution here.

这篇关于我如何初始化Admob的,并设置子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆