When the page is loaded in Safari, everything looks perfect. However, when viewed in a UIWebView, all the fonts appear enlarged.
I've done my research and tried various solutions like:
- - Setting WebView.scalesPageToFit = true
- - Applying default constraints on the webview
- - Adding
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1"/>
- - Using webkit-text-size-adjust:100%/none
I'm convinced that this issue is specific to UIWebView since the page loads fine in Safari.
This is the tutorial I followed for UIWebView: https://www.youtube.com/watch?v=rcVv1N1hReQ
Below is the code snippet I am using for UIWebView:
@IBOutlet var WebView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let URL = NSURL(string: "http://website")
WebView.loadRequest(NSURLRequest(URL: URL!))
WebView.scalesPageToFit = true
}
I've been frustrated by this issue, thank you in advance for any assistance provided.