how to increase size of text in web view

2019-07-22 12:04发布

问题:

i have a web view and i want to increase size of text in it when i press button ...

回答1:

Try this:

[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.zoom = '1.5';"]

This will zoom in all contents of the UIWebView by a factor 1.5.