Kyle Bing
Kyle Bing

Reputation: 179

UIWebView size changes unexpectedly when load page on internet

Here is the UIWebView in StoryBoard, but its content size changes when load a page from internet, i dont the problem is

Story Board

Here is it runing on iPhone, its content size is diffrent from UIWebViewsize. Is there something i did wrong? enter image description here enter image description here

This html page should look like this enter image description here

and now is this enter image description here

Upvotes: 0

Views: 34

Answers (1)

Guy Kogus
Guy Kogus

Reputation: 7341

You've set the top constraint incorrectly. You've set the top attribute of the web view to match the bottom attribute of the Top Layout Guide, instead of its bottom. Try and change that.

If it doesn't work then don't set it to match the Top Layout Guide, but instead the root view. To do this, when selecting the constraints hold the alt button and it should give you the option to create the constraint against the Container Margin.

Upvotes: 2

Related Questions