iOS

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.

iOS
A Look at the WebKit Framework in iOS 8 – Part 2
iOS
Adding a Cloud Backend for Your iOS App Using Parse – Part 1
SwiftUI
Using ToggleStyle to Build Custom Toggles in SwiftUI
There are currently no comments.

Shares