0

I have a simple webview in a viewcontroller and I want it to cover all the viewcontroller

So I've added 4 constraints:

enter image description here

But this is the result: enter image description here

As you see the webview is not covering all the space: on the left and on the right there is empty space... how can I fix this?

ernestocattaneo
  • 1,197
  • 5
  • 18
  • 30

1 Answers1

1

You should deselected the constrains to margin button under spacing to nearest neighbor.

Here is some explain about constrains to margin What is "Constrain to margin" in Storyboard in Xcode 6

"Basically if the layout margins are 8,8,8,8 (the default), a constraint with 0 leading space to container margin will have an x position of 8. Note that this is only available on iOS8 or later."

Community
  • 1
  • 1
JZAU
  • 3,550
  • 31
  • 37