Unable to Set Layout Constraint to Zero in Xcode 11.3

If you’ve upgraded to Xcode 11.3 and you use Interface Builder to create the app UI, you may find it impossible to set the value of spacing constraints to zero. Just open Interface Builder and click “Add new constraints” to try it out. After you set one of the constraints to 0, it’ll automatically revert it back to standard.

We got a number of emails from our readers asking about the issue. No worries. It’s not your fault, but a bug in Xcode 11.3. And, according to the release note of Xcode 11.4, the bug will soon be fixed:

  • Fixed a bug that prevented entering a 0 constant in the constraint popup editors. (54076090)

Any Workaround?

Meanwhile, the best way to workaround the issue is to set a constraint value larger than 0. And then, go to the Size inspector to change its value back to zero.

Alternatively, you may set the constraint value to 0.01.

Building a Message Sticker App Extension in Xcode 8
How to Integrate Google Street View in iOS Apps
Using Packages to create an installer for distributing macOS apps outside of the Mac App Store