Suppress WKWebView from scaling content to render at same magnification as UIWebView does

后端 未结 1 1913
执笔经年
执笔经年 2020-12-02 06:53

Problem

Using WKWebView in place of UIWebView, I noticed that the contents of the WKWebView were massively scaled down as co

相关标签:
1条回答
  • 2020-12-02 07:29

    I had the same problem. I just had to put

    <meta name="viewport" content="initial-scale=1.0" />
    

    into my header block and that solved it for me. Looks like WKWebView behaves more like Mobile Safari than a UIWebView does, so you need to set the viewport if you want to control scaling or general sizing.

    0 讨论(0)
提交回复
热议问题