简体   繁体   English

iPhone 6 / Plus的iAd尺寸

[英]iAd Size by iPhone 6/ Plus

I am trying to use an iAd Banner in my App. 我正在尝试在我的应用中使用iAd标语。 I have different storyboards for the various devices. 对于各种设备,我有不同的故事板。 The iPhone 4/5 versions work but the iPhone 6/6 Plus versions have sizing issues! iPhone 4/5版本可以使用,但iPhone 6/6 Plus版本存在尺寸问题! After I turned off auto layout the iPhone 6/6 Plus versions work, but they aren't in the center of the view! 关闭自动布局后,iPhone 6/6 Plus版本可以使用,但它们不在视图中心! (On the image below) (下图)

http://fs2.directupload.net/images/150812/kgdcnt29.png http://fs2.directupload.net/images/150812/kgdcnt29.png

I thought I could change it with the mode in the attributes inspector but it didn't change! 我以为可以用属性检查器中的模式更改它,但是它没有更改!

How do I fix this? 我该如何解决?

Alltough you solved it, to help out others this is the way to make the iAd Banner fit perfectly every screen size without any need of different storyboard and auto layout! 尽管您已解决了所有问题,但可以帮助 其他人,这是使iAd Banner完全适合每种屏幕尺寸的方式,而无需使用不同的故事板和自动布局! This also positions the Ad at the bottom of the screen. 这也将广告定位在屏幕底部。

self.AdBanner.frame = CGRectMake(0, self.view.frame.size.height-self.AdBanner.frame.size.height, self.AdBanner.frame.size.width, self.AdBanner.frame.size.height)

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

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