xcode 如何删除故事板或菜单上的约束
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26401965/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove constraints on storyboard or menu
提问by user3675188
I'm new to Xcode
我是 Xcode 的新手
I have lots of constraints on the object,
我对对象有很多限制,
How to remove it on XCODE?
如何在 XCODE 上删除它?
Thanks
谢谢
回答by Fogmeister
Single Constraint
单一约束
To remove a single constraint just select it and hit delete.
要删除单个约束,只需选择它并点击删除。
All constraint for a selected view(s)
选定视图的所有约束
To remove constraints for a single view you select the view and hit the triangle button in the bottom right hand corner...
要删除单个视图的约束,请选择该视图并点击右下角的三角形按钮...
And hit "Clear Constraints" under the "Selected Views" part.
并点击“Selected Views”部分下的“Clear Constraints”。
All constraints in a View Controller
视图控制器中的所有约束
To clear constraints for an entire View Controller do the same but hit "Clear Constraints" under the "All Views in ..." part.
要清除整个视图控制器的约束,请执行相同的操作,但点击“所有视图...”部分下的“清除约束”。
All constraints in a storyboard
故事板中的所有约束
To clear all constraints in the Storyboard you'd be best to disable Auto Layout and then re-enable it for the Storyboard.
要清除 Storyboard 中的所有约束,您最好禁用 Auto Layout,然后为 Storyboard 重新启用它。
回答by Kirit Modi
Clear only selected view as below. which is clear only selected view constrain.
仅清除选定的视图,如下所示。这是明确的只有选定的视图约束。
If you clear all constrain then selected below clear constrain.
如果清除所有约束,则选择以下清除约束。
You can click on constrain and press delete button also remove constrain individual.
您可以单击约束并按删除按钮也可以删除约束个人。
回答by Nicholas Smith
If you double click on the constraint in the side pane you've added a photo off, it'll locate it in the Constraints
drop down on the left hand panel then just press delete on your keyboard.
如果您双击侧窗格中已添加照片的约束,它会Constraints
在左侧面板的下拉列表中找到它,然后只需按键盘上的删除。
回答by Sunny Shah
Select the View that you want to remove constraints.
选择要删除约束的视图。
Go to Editor - > Resolve auto layout issue - > Clear Constraints
转到编辑器 - > 解决自动布局问题 - > 清除约束
You can also find at the bottom right four button. third button is for the Resolve auto layout issue
您还可以在右下角找到四个按钮。第三个按钮用于解决自动布局问题
回答by iHulk
You can select your one by one constrains and press delete button or select the view you want to remove constrains now find a button at the bottom right corner of your story board name resolve auto layout issues there select the option clear Constraints.
您可以逐个选择约束并按删除按钮或选择要删除约束的视图现在在故事板名称的右下角找到一个按钮解决自动布局问题在那里选择选项清除约束。