Home > Software design >  Do you know how to zoom content in WKWebView like it does safari?
Do you know how to zoom content in WKWebView like it does safari?

Time:07-17

I need to add to WKWebView the same functionality as safari has (aA). But I don't find any properties in WKWebView which allow to do the same.

Do you know how safari does this?

Is it possible to reproduce the same in WKWebView? example of functionality in Safari here

CodePudding user response:

just use this

let js = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='200%'"//dual size
webView.evaluateJavaScript(js, completionHandler: nil)
  • Related