I wasn't able to display the banner using dapp exported code which looks like it's navigation based I have followed through many samples including iadsuites sample from apple (navigation based) but there's no display of banner anywhere no matter where I put the position of the banner. I understand navigationcontroller takes up the whole screen which I'm assuming which is why it wasn't able to display the banner. I would like to get sample, tutor , help to be able to display the banner. Thanks =)
我无法使用dapp导出的代码显示横幅,这看起来像是基于导航的我已经跟踪了很多样本,包括来自苹果的iadsuites样本(基于导航)但是无论在哪里,我都没有显示横幅的位置旗帜。我知道navigationcontroller占据了整个屏幕,我假设这就是为什么它无法显示横幅。我想得到样本,导师,帮助能够显示横幅。谢谢=)
I have no xib and everything is done programmatically!
我没有xib,一切都是以编程方式完成的!
1 个解决方案
#1
1
This tutorial may help you:
本教程可以帮助您:
http://www.raywenderlich.com/1371/how-to-integrate-iad-into-your-iphone-app
The key to getting it to work in a UIViewCotroller is this from the article:
让它在UIViewCotroller中工作的关键是这篇文章:
What we’re going to need to do with iAd is scroll an ad view onto the screen when an ad is available, and shrink the rest of the content to fill the remaining space. As currently designed, this isn’t that easy because all of the controls are direct children of the root view. But there’s an easy way to fix it – we’ll simply move the controls into a subview instead!
我们需要对iAd做的是在广告可用时将广告视图滚动到屏幕上,并缩小其余内容以填充剩余空间。按照目前的设计,这并不容易,因为所有控件都是根视图的直接子控件。但是有一种简单的方法可以解决它 - 我们只需将控件移动到子视图中!
If it's a navigation based app, the rootController would be UIViewController. I believe you'll need to put all your views inside a containing view so you can resize it and animate in the iAD.
如果它是基于导航的应用程序,则rootController将是UIViewController。我相信您需要将所有视图放在包含视图中,以便您可以在iAD中调整其大小和动画。
#1
1
This tutorial may help you:
本教程可以帮助您:
http://www.raywenderlich.com/1371/how-to-integrate-iad-into-your-iphone-app
The key to getting it to work in a UIViewCotroller is this from the article:
让它在UIViewCotroller中工作的关键是这篇文章:
What we’re going to need to do with iAd is scroll an ad view onto the screen when an ad is available, and shrink the rest of the content to fill the remaining space. As currently designed, this isn’t that easy because all of the controls are direct children of the root view. But there’s an easy way to fix it – we’ll simply move the controls into a subview instead!
我们需要对iAd做的是在广告可用时将广告视图滚动到屏幕上,并缩小其余内容以填充剩余空间。按照目前的设计,这并不容易,因为所有控件都是根视图的直接子控件。但是有一种简单的方法可以解决它 - 我们只需将控件移动到子视图中!
If it's a navigation based app, the rootController would be UIViewController. I believe you'll need to put all your views inside a containing view so you can resize it and animate in the iAD.
如果它是基于导航的应用程序,则rootController将是UIViewController。我相信您需要将所有视图放在包含视图中,以便您可以在iAD中调整其大小和动画。