ios - Xcode 故事板:如何使用 10 多个文本字段适应不同的屏幕尺寸
问题描述
我已经在差不多 +2 天内一直在使用布局。观看多个 youtube 视频,阅读几乎 50 多个堆栈溢出线程,但我无法让我的布局适应不同的屏幕尺寸。
我在另一个视图中有一个视图。所以主视图是全屏,子视图是半屏。问题是即使我设置了约束和所有这些,它也不会自动适应不同的大小,尤其是标签/文本字段。
关于如何解决这个问题的任何想法?
解决方案
So if I understood correctly you want the second View
to be always the half of the main View
.Because the main is the whole screen and its going to be half the screen.
If you want something like this
Go to your storyboard
推荐阅读
- python - 如何使用 Python 计算分类列的分组比例(在组比例内)?
- python - 我生成的 python-docx lambda 层有问题吗?或者我的 docx 生成器代码中有什么东西?
- java - Freemarker - 将一个对象打印到另一个对象中
- mysql - 安装后没有 MySQL 应用程序
- sql - 为什么我的查询在 Visual Studio 2010 报表生成器中不起作用
- python - 如何在调用函数时强制命名函数的必需参数,而不给参数提供默认值?
- python - 以某个字符结尾的正则表达式应避免在此之前多次出现该字符
- reactjs - 有没有办法将加载器组件添加到 Material ui Autocomplete 组件
- php - 使用 PHP 将 CSV 文件解析为列
- multiprocessing - fortran 中系统范围的唯一文件名