在xcode 6.1中,界面构建器删除了ui元素 [英] In xcode 6.1, interface builder deleting ui elements

查看:116
本文介绍了在xcode 6.1中,界面构建器删除了ui元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些视图,包括一些tableviews和一些集合视图以及一些按钮和标签。

I have a view with some tableviews and some collection views and also some buttons and labels.

我不确定这是否是Xcode 6.1的新功能因为我有一段时间没有参与这个项目的ui方面。但是,当我尝试调整视图中的任何内容时,我的tableviews和集合视图以及可能的其他一些我没有注意到的元素会被删除。具体来说,似乎它们的框架或矩形属性被删除了。

I'm not sure if this is new with Xcode 6.1 because I have not worked on the ui aspect of this project for some time. However, when I try to resize just about anything in the view, my tableviews and collection views, and possibly some other elements I am not noticing, get deleted. Specifically, it seems their frame or rect propertied get deleted.

要清楚,这只有在我尝试通过拖动界面构建器中的边来调整元素大小时才会发生。如果我通过直接在IB侧栏或xml中更改数字来调整它们的大小,则不会发生这种情况。

To be clear, this only occurs when I attempt to resize the element by dragging the sides in interface builder. If I resize them by changing the numbers directly either in the IB sidebar or in the xml, this does not happen.

我想知道这是否是Xcode中的错误或者如果我做了某些事情导致我可以改变这种行为。

I'm wondering if this is a bug in Xcode or if I have done something to cause this behavior which I can change.

谢谢!

推荐答案

我通过在显示文件检查器 - >界面构建器文档中关闭自动布局来实现修复,至少对于此项目而言

I acheived a fix, at least for this project by turning off auto layout in "show the file inspector" -> "interface builder document"

我以前从未使用过这个功能,所以我不知道它是否在过去,但我想知道新的Xcode版本是否默认打开,其他人将其关闭。
它也可能一直都在,但新版本中的功能有一个错误。

I have never used this feature in the past so I do not know if it was on in the past but I am wondering if the new Xcode version turns it on by default where the others left it off. It may also be possible that it has always been on but there is a bug in the feature in the new version.

这解决了我的问题,至少在这个特定的项目中,至少在现在。我希望其他人觉得这很有用。

This fixed the issue for me, at least in this particular project and at least for now. I hope others find this useful.

这篇关于在xcode 6.1中,界面构建器删除了ui元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆