iOS:Admob 智能横幅不占据全宽

标签 ios uiviewcontroller admob uiwindow adbannerview

我创建了横幅:

    bannerView = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait)  
    bannerView.adUnitID = "ca-76543456707"
    bannerView.delegate = self

它应该是全宽,我将它添加到带有前导、拖尾、顶部和底部约束的 View 中。对于大多数广告,结果是全宽。但对某些人来说则不然。为什么? 这是一个示例: 奥 git _a 红色是 View 的颜色。

如何使其全宽?

最佳答案

Typically, Smart Banners on phones have a height of 50dp in portrait and 32dp in landscape. On tablets, height is normally 90dp in both orientations.

When an image ad isn't large enough to take up the entire allotted space, the image will be centered, and the space on either side will be filled in.

enter image description here

您还可以在 AppStore 上查看实时应用程序,您会注意到在较大宽度的设备上它们也显示 320 宽度。

关于iOS:Admob 智能横幅不占据全宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45846554/

相关文章:

ios - 当数组有数据时在 Swift 中解析返回空数组

用于桌面浏览器和 iOS & Android 的 JQuery 滚动条组件

ios - Swift - 按子值从 Firebase 中选择

iphone - 访问 UIViewController 时的 SIGABRT

swift - 是否可以创建全 View Controller 的图像(不仅仅是屏幕上的内容)?

android - 我正在使用 firebase_admob 在我的 flutter 应用程序中实现 abmob,但广告在发布版本 apk 中不起作用

android - Andengine - 从启动画面中删除广告

ios - 如何从另一个 UIPickerView 更改 UIPickerView 的字符串?

ios - 如何使用 iOS5 的 viewcontroller 创建通用 View ?

android - 如何在 SDK 20.0.0 中设置 Interstitial 的广告监听器?