Why is Leading / Trailing space showing as -16?

When I upgraded my Xcode from version 5 to 6, I saw strange things in the storyboard. Here is one example:

  • What was my requirement - I did not need a space between my view and the view of the container.
  • What I did - I dragged the left / right edges of the view so that it matches the edge of the container. And then I set the horizontal distance limit.

Previously used value - Lead / trailing space to: Superview Equals: 0

Now, after upgrading to Xcode 6, it always shows - Lead / trailing space: Superview Equals: -16.000000

Why is this happening?

+8
ios xcode-storyboard
source share
2 answers

This container margin. I think it applies the default margin to the edges. If you want to set a Leading/Trailing Space to Superview , you can do this.

enter image description here

If you have already created a limit, you can select this restriction and clear the Relative to margin check box.

enter image description here

Please note that the Relative to margin function is available only in iOS >= 8 , the application will crash (not sure, but should) on iOS < 8 .

+11
source share

Try unchecking the "About field" box. enter image description here

+5
source share

All Articles