Reputation: 151
I am using a UIWebview to display a web page (that's responsive in Safari) for a login portal but the width and height seem to be running off the screen. Universal, using Any Width, Regular height.
Images:
Sorry for the image quality.
Upvotes: 2
Views: 3722
Reputation: 62062
This can be prevented by adding some auto-layout constraints so that your web view will always take up the same portion of the screen no matter the device it runs on.
With the web view selected in interface builder, open up the constraints menu and add the appropriate constraints:
Note that I unchecked the "Constrain to margins" as I want (and looks like you probably also want) your view to go all the way to the edges of the view controller.
When your done, the IB side menu should look about like this:
Upvotes: 9