I used to use autolayout add new constraints to make simple constraints to superview / relative view like this (for loooong time):
However, recently after upda
As of Xcode 11.3.1:
The neatest and fastest solution I've found is as follows:
Simply type in -0
into the constraint field. Xcode appears to discard the negative and it behaves correctly, which is better than it reading 0.01
for everything.
You can insert all constraints at once, without having to do one at a time or go and edit later.
Xcode displays the values as this
It does seem like really dumb behaviour. Is there a reason that Apple might have made it do this deliberately...?
Edit: This doesn't seem to work every time, which is frustrating. I've just had a UIImageView show 0 to Superview, yet still visually be at the default value (20). This really does seem like a bug with the IB as the behaviour is totally illogical.
Edit 2: Seems to be fixed now - phew!