热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在Xcode中将图像大小调整为不同的iPhone屏幕大小-adjustingimagessizestodifferentiPhonescreensizesinXcode

Iconstructedthestoryboardinthesizeclasscompactwidthandregularheight.whenirunitin

I constructed the storyboard in the size class "compact width and regular height." when i run it in the iPhone 6 simulator, it looks fine and exactly as it does on the screen. but when i run the app on the iPhone 5 simulator, the images run off the screen. basically all the elements kept their exact size and did not scale down to the smaller screen size of the iPhone 5.

我在尺寸等级“紧凑宽度和常规高度”中构建了故事板。当我在iPhone 6模拟器中运行它时,它看起来很好,就像在屏幕上一样。但是当我在iPhone 5模拟器上运行应用程序时,图像会在屏幕上运行。基本上所有元素都保持其确切的大小,并没有缩小到iPhone 5的较小屏幕尺寸。

likewise, when run it in the iPhone 6plus simulator there is a lot of extra white space.

同样,在iPhone 6plus模拟器中运行它时会有很多额外的空白区域。

how can I fix this? is there an easy fix or do I have to remake all of the storyboards that I've done?

我怎样才能解决这个问题?有一个简单的解决方案还是我必须重新制作我所做的所有故事板?

1 个解决方案

#1


Since you are doing it with the IB you need to set aspect fill. Sometimes constraints will complain if you do this so only set ones that won't hurt you.

由于您使用IB进行操作,因此需要设置纵横填充。如果你这样做,约束会抱怨,所以只设置那些不会伤害你的人。


推荐阅读
author-avatar
茨冈人686
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有