AdMob的GADBannerView加载的视图的可见区域外的广告 [英] AdMob GADBannerView loads advertisement outside of view's visible area

查看:374
本文介绍了AdMob的GADBannerView加载的视图的可见区域外的广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用AdMob的调解,我已经试过了iOS的快速启动文档AdMob的位置的此处。它的工作原理,我可以看到测试的广告,但广告似乎加载GADBannerView的可见区域之外。我可以广告拖到可见区域,但是当广告刷新,旗帜再次加载可视区域之外。我想不出什么我做错了,我也不看什么办法解决这个的,因为AdMob的iOS的SDK似乎处理一切,一旦你已经装载的看法。任何帮助是非常AP preciated。我已经包括了一个动画来更好地说明我的问题。

I'm trying to use AdMob mediation and I've followed the instructions in the iOS Quick Start document for AdMob located here. It works, and I can see the test ad, but the advertisement seems to load outside of the visible area of the GADBannerView. I can drag the advertisement into the visible area, but when the ad refreshes, the banner again loads outside of the viewable area. I can't figure out what I'm doing wrong, nor do I see any way of fixing this, since the AdMob iOS SDK seems to handle everything once you've loaded the view. Any help is much appreciated. I've included an animation to better illustrate my issue.

(用白色背景上的观点是psented模态时,工具栏按钮被触摸的观点与蓝色背景和GADBannerView初始化为黑色背景为方便$ P $。)

(The view with the white background is presented modally when the toolbar button is touched on the view with the blue background and the GADBannerView is initially loaded with a black background for convenience.)

编辑:我发现,问题似乎有事情做在导航控制器嵌入视图控制器。当导航控制器不是present,然后,添加导航控制器,该广告就存在这种行为后,它不会发生。

I've discovered that the issue seems to have something to do with embedding the view controller in a navigation controller. It doesn't happen when the navigation controller is not present, then, after adding the navigation controller, the ad exhibits this behavior.

推荐答案

我经历了类似的问题,在下面的方式试图嵌套一个GADBannerView在笔尖的时候:

I experienced a similar issue, when trying to nest a GADBannerView in a nib in the following way:

  • 在笔尖
  • 在自定义视图控制器
  • 的UIView
  • 在自定义视图类
  • 然后实例化的GADBannerView在code

有一个解决方法,我发现是要取消扩展边缘......在顶部栏复选框,在视图控制器的笔尖的属性检查器。

A workaround I found was to uncheck the "Extend Edges ... Under Top Bars" checkbox in the view controller's nib's attributes inspector.

这当然意味着导航控制器不应该是半透明的,否则你会得到导航控制器背后的一些丑陋的衰落。

This of course means that the navigation controller shouldn't be translucent or you'll get some ugly fades behind the navigation controller.

这篇关于AdMob的GADBannerView加载的视图的可见区域外的广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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