Sometimes the autolayout constraints snap to a wrong anchor point – like when I want a control to be anchored to a control above it and the autolayout constraint gets anchored to the bottom of the window. Is there a way to move the constraint? An ASCII art should make this more clear. This is what I have:
+------------------------+
| |
| [x] Some checkbox |
| |
| [x] Another checkbox |
| | |
| | ← autolayout |
| | constraint |
| | |
+-----+------------------+
And this is what I want instead:
+------------------------+
| |
| [x] Some checkbox |
| | ← A.C. |
| [x] Another checkbox |
| |
| |
| |
| |
+------------------------+
I can anchor the constraint to the upper checkbox by moving the lower checkbox upwards, but that’s not what I want, I want the vertical space to be larger. (The checkboxes are just for an illustration, my real use case has different views.)
Now select the useless constraints and delete it: