OGeek|极客世界-中国程序员成长平台

标题: ios - xib(Xcode8)上UIView/UIImageView的大小变成(1000, 1000) [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:14
标题: ios - xib(Xcode8)上UIView/UIImageView的大小变成(1000, 1000)

我在 xib 上使用自动布局来创建我的 UI。

当我完成我的 UI 时。它在模拟器上运行良好。

但是当我下次打开Xcode8时,xib显示奇怪。
有的 UIView 和 UIImageView 变大了。
大小变为 (1000, 1000)

Wrong Size

即便如此,当我在模拟器上运行时,它看起来还不错。
但是xib不能轻易修改。

我尝试更新框架。变得更糟

Worse after updating the frames

我应该如何处理?



Best Answer-推荐答案


这是 Xcode8 的问题。这在 Xcode8.1 beta2 中已修复。

Xcode 8.0 did not always restore view frames from storyboards and xibs when layouts were ambiguous. Xcode 8.1 fixes several of these issues. If you have encountered these issues, resolve the ambiguity in the Auto Layout issues and update frames. Xcode 8.1 will persist them correctly. (28221021, 28244619)

详情可见release notes

关于ios - xib(Xcode8)上UIView/UIImageView的大小变成(1000, 1000),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40081149/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4