ernestocattaneo
ernestocattaneo

Reputation: 1207

Why does not the webview fit all the view?

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?

Upvotes: 0

Views: 89

Answers (1)

JZAU
JZAU

Reputation: 3567

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."

Upvotes: 1

Related Questions