When I wanted to add constraints to a stack view, I wanted it to constraint to margins. I checked the box off, but it would not work. Please help (Using Xcode 9).
I was having the same problem and recently resolved the issue by turning off the safe area. Safe Area Layout is enabled by default. To disable Safe Area Layout in Xcode 9, choose View > Utilities > Show File Inspector and deselect the checkbox for Use Safe Area Layout Guides. This should correct the issue. Good luck, hope it helps.