0

I am facing a problem in xcode Version 11.2.1 for setting constraints of anything inside of storyboard.

When I try to put constraint 0, it automatically converts it to the standard. I've attached the screenshot.

enter image description here

is there any proper solution to resolve this issue?

I'm attaching another screenshot and want to remove space between these views

enter image description here

Aqeel Ahmad
  • 709
  • 7
  • 20
  • but i want to set constraint 0 instead of standard. how can i do that? – Aqeel Ahmad Dec 31 '19 at 15:01
  • Apple update this feature (0 stand for standard) Uncheck Constrain to margin – SAXENA Dec 31 '19 at 15:05
  • @SAXENA let me explain you a little bit more. I want to establish two views side by side and don't want to set any space in between. But when I set it to 0 it converts it to standard which results in a little bit spacing between these views (around 8 pixel). – Aqeel Ahmad Dec 31 '19 at 15:15
  • I've edited my question, now you will be able to see it clearly. – Aqeel Ahmad Dec 31 '19 at 15:22
  • 1
    you can enter 0 in the constant field, it shud be able to take 0 then – Teja Nandamuri Dec 31 '19 at 17:24
  • @Teja Nandamuri means to put constraint 0 I will have to click multiple time to reach attribute inspector to make it 0 ? – Aqeel Ahmad Jan 01 '20 at 07:27
  • Hope they fix this in their next release. @AqeelAhmad – Teja Nandamuri Jan 02 '20 at 13:48
  • This is honestly the biggest pain in the ass. Take note that this is how Apple forces you into using their newest toy (SwiftUI). They make not using it more and more frustrating. – Bergasms Jan 06 '20 at 22:15
  • 1
    i found if I add 0 and click `Add Constraints` button right away, it doesn't set to `Standard`. It looks it becomes `Standard` when the textfield lose the focus. – Joey Jan 24 '20 at 01:42
  • 1
    Try inserting -0 instead. Weird but does the job. – kacho Jan 25 '20 at 15:01

1 Answers1

1

Apple says that this bug will be fixed in Xcode 11.4:

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

Please, check this answer https://stackoverflow.com/a/59465865

Oleh Koval
  • 111
  • 1
  • 5