gpt4 book ai didi

ios - 如何摆脱 iPhone X 启动屏幕底部的空白区域

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:25:08 26 4
gpt4 key购买 nike

即使我使用的是安全区域,iPhone X 的启动屏幕底部仍有空白区域。

White space at the bottom

在 interface builder 上似乎没问题:

On interface builder

我正在为我的约束使用 superview:

Constraints

这是 View 层次结构:

View hierarchy

我怎样才能摆脱它?

最佳答案

您看到的空白是 Controller 默认 View 背景色。

问题是当您尝试向任何 View 添加顶部/底部约束时。它将约束添加到布局指南(默认行为)

To over-write that. you can click the arrow next to the constrait constant value. which shows the views that you can connect against. obviously you need to connect with the one with the largest distance value, and set the constant value to 0.

enter image description here

同样适用于启动屏幕 Controller 。

如果您已经添加了约束。您可以从约束 Attributes Inspector 更改它:

enter image description here

如果您有一个top 约束,您需要选择First Baseline。如果您有bottom 约束,则需要选择Last Baseline

关于ios - 如何摆脱 iPhone X 启动屏幕底部的空白区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46402287/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com