I added a subView inside a super view. They have same x-location. Then I added a leading constrain between these two but the constrain value is -20. I faced this issue many times. I don't know why they seems aligned together but the constrain is -20 different.
Asked
Active
Viewed 44 times
0
-
Check the comments here. http://stackoverflow.com/questions/29875187/why-do-i-have-to-set-trailing-space-to-16-in-interface-builder-to-get-full-scre – Shamas S Apr 20 '16 at 03:07
2 Answers
1
The margins are different for each device size.
The right way to set the space between the boundaries and your view to 0 is to uncheck the constrain to margins
checkbox

alephao
- 1,234
- 13
- 20
0
It's because the default constraints are relative to margin. If you don't want the -20, uncheck the "constraint to margins."

Xchord
- 678
- 1
- 5
- 20