gpt4 book ai didi

ios - 每次重启 Xcode 时 Storyboard都缺少约束

转载 作者:IT王子 更新时间:2023-10-29 08:12:13 24 4
gpt4 key购买 nike

storyboard 中使用 auto layout,我在 UILabel 上添加了一些约束并且没有警告,然后我重新启动了 Xcode 它会像图片一样显示警告,我修复了警告,但是当我重新启动 Xcode 时,同样的警告再次出现。现在我的 storyboard 中有大约 20 个相同的警告,每次重新启动 Xcode 时我都必须修复它。

编辑细节

1. A UILabel with width is 0 and constraints is like this

enter image description here

2. When I restart Xcode, then it change to :

enter image description here

3. And show me the warning:

enter image description here

4. Then I have to click the waring button and 'Update Frame' to fix it

enter image description here

最佳答案

经过简单的研究后,我发现这个错误很容易重现,并且不依赖于 git、 Storyboard 权限等。要重现它,您只需创建不带文本的 UILabel 并将其宽度设置为 0。此外,您不需要需要添加一些额外的 View ,只是一个 UILabel。总而言之,我认为您在 Storyboard中发现了一个错误,不幸的是我还没有找到任何解决方法。也许你应该报告它 https://bugreport.apple.com .

关于ios - 每次重启 Xcode 时 Storyboard都缺少约束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27074728/

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