简体   繁体   English

禁用Xcode Storyboard中的约束

[英]Disable Constraints in Xcode Storyboard

I'm trying to layout a very simple view. 我正在尝试布局一个非常简单的视图。 I've placed 4 custom buttons in the view in a grid like spacing. 我在视图中放置了4个自定义按钮,如间距。 But when I run the app I get two of the buttons with different sizes. 但是当我运行应用程序时,我得到两个不同大小的按钮。 I've included the storyboard and simulator images here. 我在这里包含了故事板和模拟器图像。

I would LOVE to disable constraints but cant find where to do it! 我会喜欢禁用约束,但无法找到它的位置! I really don't want them. 我真的不想要他们。 This is just for a simple prototype app and in the end I won't even have these buttons, I'll lay everything out in code. 这只是一个简单的原型应用程序,最后我甚至没有这些按钮,我将把所有内容都放在代码中。

I've tried dragging in 4 individual buttons AND tried just dragging in one and duplicating it to where I want. 我试过拖动4个单独的按钮并尝试拖动一个并将其复制到我想要的位置。 I just want them to stay where I put them! 我只是希望他们留在我放的地方! Any help would be appreciated. 任何帮助,将不胜感激。

-Mark -标记

故事板

模拟器

你在文件检查器(左边的第一个选项卡)中关闭它 - 有一个名为“使用Autolayout”的复选框(默认选中它)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM