The size of UIView/UIImageView on xib(Xcode8) become (1000, 1000)

雨燕双飞 提交于 2019-12-11 03:25:55

问题


I use autolayout on xib to create my UI.

When I finish my UI. It work well on simulator.

But when I open Xcode8 next time, the xib show strange.
Some UIView and UIImageView become big.
The size become (1000, 1000)

Even so, when I run on simulator, it look well.
But the xib cannot be modify easily.

I try to update the frame. It become worse

How should I deal with it?


回答1:


It's Xcode8's issues. And that is fixed in 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)

Details can be found in release notes



来源:https://stackoverflow.com/questions/40081149/the-size-of-uiview-uiimageview-on-xibxcode8-become-1000-1000

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!