gpt4 book ai didi

ios - 使用 Storyboard 设计 ViewController

转载 作者:行者123 更新时间:2023-11-28 20:18:09 25 4
gpt4 key购买 nike

我设计的 ViewController 包括 1 个 UIView 和 1 个按钮,但是当我在 Emulatore 中部署时,它与我在 Storyboard文件中看到的不一样。

enter image description here

最佳答案

这是您拥有的自动布局约束的结果。 Storyboard中的默认屏幕尺寸适用于 iPhone 5,但默认模拟器是 iPhone 4 尺寸,因此通过与屏幕顶部和底部的固定距离, View 必须被压缩以满足约束。

要解决这个问题,您应该给 View 一个固定的高度(从菜单中,Editor --> Pin --> height),然后删除底部约束。

关于ios - 使用 Storyboard 设计 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17005999/

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