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.
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.