Xcode 6.1: UIViews disappearing in interface builder when adjusting frames

做~自己de王妃 提交于 2019-12-07 17:37:11

问题


I'm fairly new to Interface Builder and I'm trying to practice it with a very simple view. Basically, I have 3 UIViews on my view controller. The problem I am having is that whenever I adjust the frame of 1 of the UIViews, the other 2 will disappear.

Here is a short 7 second video of the problem: https://vine.co/v/OMlbMIdWMe5

If I run the app on my device, I only see 1 of the views (the 1 I was adjusting) - the other 2 remain hidden.

I am using Xcode 6.1 . What could be causing this?

***EDIT: If I add 1 constraint to a view, it won't disappear when I readjust the frame of the other view. That is:

Add a constraint to ViewOne then readjusting size of ViewTwo will only cause ViewThree (without any constraints) to disappear.

So the solution is to add constraints to all 3 views before readjusting the frame of any of them. But still, what could be causing this issue?


回答1:


This is an issue with Xcode 6.1, and has been reported to apple. A similar post can be found here.

WORKAROUND: I have found that you can edit the constraints in the right hand pane of the storyboard editor, in the size inspector. It actually does not prove that tedious.




回答2:


You can disable autolayout if you don't need it, that helps. Otherwise, wait for next patch~



来源:https://stackoverflow.com/questions/26669173/xcode-6-1-uiviews-disappearing-in-interface-builder-when-adjusting-frames

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