3

Whenever an auto-layout constraint is "deleted" from the Size Inspector, it's not actually deleted, merely "uninstalled". After this point, it's still there, just faded/greyed out, visible on the scene hierarchy on the left and when "All" is selected under Constraints on the Size Inspector.

Scene hierarchy:

Greyed on Scene list

Size Inspector:

Greyed on Size Inspector

While they can be removed from the scene hierarchy with a simple click/delete, there's no way to filter the uninstalled ones from the uninstalled one, and each must be selected manually to be deleted.

Additionally, any that are collapsed under objects (e.g. a height constraint for a label) aren't immediately visible.

They appear nicely arranged on the size inspector, but there doesn't seem to be any way to fully remove them straight from there.

Does anyone have any suggestions on quickly removing these, without tampering with my existing installed, wanted constraints?

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
MikeOShay
  • 522
  • 1
  • 7
  • 17
  • It is easier to set constraints programmatically. – ericgu Jan 20 '15 at 18:51
  • That's really more of an opinion than a solution. – MikeOShay Jan 21 '15 at 02:03
  • Alternatively (not sure if you'll see this), do you have any tutorials/references on programming Swift constraints that you'd recommend? – MikeOShay Jan 21 '15 at 22:35
  • Without interface builder? – ericgu Jan 21 '15 at 22:43
  • Well I'm just curious how you would recommend I do it, you say it's easier to do it programmatically. Would this have to be done at compile time through the actual swift code? Would you set up all the XML on the storyboard code manually? – MikeOShay Jan 22 '15 at 02:46
  • 1
    http://www.thinkandbuild.it/learn-to-love-auto-layout-programmatically/ – ericgu Jan 22 '15 at 03:07
  • 1
    then read apple docs to plug in the holes or extend – ericgu Jan 22 '15 at 03:09
  • 1
    https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/VisualFormatLanguage/VisualFormatLanguage.html – ericgu Jan 22 '15 at 03:10
  • Excellent, thank you for the references. I'll still leave this question open in case there is a way of easily removing them through the UI, but if I determine a quick fix through code, I'll probably answer it myself. – MikeOShay Jan 22 '15 at 03:35

2 Answers2

-1

Press cmd+delete to delete those

Aggressor
  • 13,323
  • 24
  • 103
  • 182
  • 1
    All this seems to do is threaten to move the entire working document to the trash. Selecting them on the scene view and simply hitting delete works fine, but I'm hoping for a quicker way to remove all of them. – MikeOShay Jan 21 '15 at 01:35
-1

What you can do is select your object (button etc.) by clicking on it with the mouse. Then use the right mouse or hold the control key and click your mouse. After that you get a window where you can click on the cross on the connection to delete that constraint. You might have to scroll down in that window to find it.

Ben Link
  • 107
  • 5
  • All that appears in this popup for me are referencing outlets and events, nothing relating to the constraints. – MikeOShay Jan 21 '15 at 01:31