简体   繁体   English

当iPhone旋转时管理iAd尺寸

[英]Manage iAd size when iPhone rotate

I've been googling and I cannot find anything on this. 我一直在谷歌搜索,对此我找不到任何东西。

I have an iAd banner working fine in portrait mode on iPhone. 我有一个iAd横幅广告,在iPhone上的纵向模式下工作正常。 I want it to go to landscape mode. 我希望它进入横向模式。 But I'd like to have the size it should have (the default exact size for landscape). 但我想拥有它应该具有的尺寸(横向的默认精确尺寸)。 I have set constraints so that it's sticked to bottom left and right. 我已经设置了约束,以便将其固定在左下和右下。 Height is also a constraints (set to 50, default portrait height) because I get errors and misplacement otherwise. 高度也是一个约束(设置为50,默认纵向高度),因为否则会出现错误和放错位置。 The only thing I need is to have height 32 when iPhone rotate to landscape. 我唯一需要的是将iPhone旋转到横向时将高度设置为32。

I've seen that all resizing method of ad banner are deprecated since iOS 6. Any idea how to do it then ? 我已经看到,自iOS 6起,所有广告横幅的大小调整方法都已弃用。然后知道怎么做吗?

Thanks ! 谢谢 !

检测界面的旋转并更新约束中的常数(可以根据需要设置约束变化的动画)。

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

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