Page 1 of 1

Web views "shrink" the web page

Posted: Fri Nov 04, 2016 6:54 pm
by AKWillows
Hi

So, I'm trying to incorporate a webview, but finding it is "shrinking" the web page on display.

So, I have a very simple webpage hosted locally which contains a widget 320px x 320px - and nothing else. I imagined that I could add a webview of the same dimensions to the app and it would display at the proper size. However, what it does is to shrink the widget to a quarter of its size so that it only fills the top right quarter of the web view box.

Is there any way I can control the "zoom" in the web view box, or do I need to do something to the web page itself?

Anyone else had any similar experience?

Re: Web views "shrink" the web page

Posted: Sat Nov 05, 2016 9:57 am
by Jonathan
May be a long shot, but try adding something like his into the header of the page e.g.:

Code: Select all

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
There's more information here:
https://developer.apple.com/library/con ... wport.html

Re: Web views "shrink" the web page

Posted: Sat Nov 05, 2016 5:05 pm
by AKWillows
You are a star!

That worked perfectly :) Thank very much!