我为iOS4或iOS5编写了一个应用程序。 我将它升级到iOS6。 添加新约束是相当痛苦的(我必须几乎完全重做故事板,我不得不创建一堆约束,因为它们以前不存在),但我完成了它。 现在我使用XCode 6.4升级到iOS8。 我在iOS8中编写了其他应用程序,约束图标始终位于底部; 其中有3个:对齐,固定和解析自动布局。 但是,在这个较旧的应用程序中,所有这些图标都丢失了(同样中间的W Any H Any也丢失了)。 其中一个约束是错误的,但我无法解决它,因为我没有任何约束图标。 我该如何取回它们?
这是一个显示约束图标的新应用程序:
这是缺少约束图标的旧应用程序:
I wrote an app for iOS4 or iOS5. I upgraded it to iOS6. Adding the new constraints were rather traumatic (I had to almost completely redo the Storyboard and I had to create a bunch of constraints since they didn't exist before), but I got through it. Now I'm upgrading to iOS8 using XCode 6.4. I have written other apps in iOS8 and the constraint icons are always on the bottom; there are 3 of them: Align, Pin, and Resolve Auto-Layout. However, in this older app, all of these icons are missing (also the W Any H Any in the middle is missing as well). One of the constraints is wrong, but I can't fix it because I don't have any constraint icons. How do I get them back?
Here is a new app that shows the constraint icons:
Here is the old app with the constraint icons missing:
最满意答案
选择故事板(在左侧)和文件检查器(在右侧;屏幕截图中不存在,您必须故意显示它)。 “文件”检查器具有“使用自动布局”复选框。 如果故事板不使用自动布局,您将看不到这些约束图标。
Select the storyboard (on the left) and the File inspector (on the right; not present in your screen shots, you'll have to show it deliberately). The File inspector has a Use Auto Layout checkbox. If the storyboard doesn't use auto layout, you won't see those constraint icons.
更多推荐
发布评论