简体   繁体   English

更新的尺寸类别的xib在iPhone 6和iPhone 6 Plus中不显示iAd

[英]Renewed xib with Size Classes not showing iAds in iPhone 6 and iPhone 6 Plus

I need to update my old application to support iPhone 6 and iPhone 6 Plus devices. 我需要更新旧应用程序以支持iPhone 6iPhone 6 Plus设备。 After few changes and adding images with @3x size all interface looks good now, but I have noticed that when I check "Use Size Classes" inside the xib file I can no longer see iAds in iPhone 6 and iPhone 6 Plus. 3倍大小一些改变,并添加图像与@毕竟现在的界面看起来不错,但我注意到,当我检查了厦门国际银行文件中“使用大小类”我再也不能看到在iPhone 6和iPhone 6 Plus进行网络成瘾者 All other devices shows ads normally. 所有其他设备正常显示广告。 For testing I'm just using simple line of code to support ads: 为了进行测试,我仅使用简单的代码行来支持广告:

  self.canDisplayBannerAds = YES;

Inside the xib file I have only navigation bar, date time picker and few labels. 在xib文件中,我只有导航栏,日期时间选择器和几个标签。 There are no visible elements that can hide banner. 没有可见的元素可以隐藏横幅。 I had also other VController with xib file, but I've changed it to the controller without xib with programmatically implemented view elements, so it shows ads now. 我也有其他带有xib文件的VController,但是我已将其更改为不带有通过编程实现的view元素的xib的控制器,因此它现在可以显示广告。 Interstitial ads loads without problems in all view controllers. 插页式广告可以在所有视图控制器中正常加载。 Does anybody had the same problem and knows how to solve it? 是否有人遇到过相同的问题并且知道如何解决?

I found the solution by myself. 我自己找到了解决方案。 When using xib file and using 使用xib文件并使用

self.canDisplayBannerAds = YES;

in my situation I moved this command from viewDidLoad to viewDidAppear and banner showed up. 在我的情况下,我将此命令从viewDidLoad移到了viewDidAppear并显示了横幅。 Now I can see banners in all devices. 现在,我可以在所有设备上看到横幅。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM