Cocoa WebView font is too small

When I add WebView to my application, the font size of web pages is much smaller than in Safari. Is there any reason?

+3
source share
1 answer

Yes. You need to set the default font to 16px if you want the font size to match the size of Safari. You can do this in Interface Builder.

You can also do this programmatically:

[[webView preferences] setDefaultFontSize:16];
+12
source

Source: https://habr.com/ru/post/1744080/


All Articles