This is a new and weird problem I’m facing in xCode 11.2. After adding a view and positioning them to the edges of superview when I tried to set constraints I see that these options are disabled.
Add to this weirdness is that if I position this subview with some spaces around it then I can set values in Add New Constraints.
This drama doesn’t stop here. If I set the top, bottom, leading and trailing constraints to 0 in Size Inspector then the problem reappears.
I’ve observed that this problem happens in all views on all storyboards so something globally has gone wrong.
Still trying to find the solution, will update if I manage to solve it.
Solution 1: Restart xCode
Some people have reported that restarting xCode solved their problem but it didn’t solved mine.
Solution 2: Set Layout
Set layout of view and superviews to Automatic if it is set to Translate Masks Into Constraints. It may solved issue but my issue is still not solved by this change.
Solution 3: It’s not a problem?
Well it’s not really a problem or may be a new style from Apple? Click on the dotted lines and enter any value apart from 0. After all constraints are set. Go to Size Inspector and edit the constraints to desired value