I’m experiencing a problem with a WKWebView
on setting the magnification property.
I expecting the content to resize to fit like it does in Safari. But I can’t achieve this. When setting the magnification to a value less than 1.0 is the following.
The extra space is not used and a margin occurs. In Safari zooming out results in smaller text and image size but the extra space is actually used.
I'm using InterfaceBuild with XIB files wire up the view.
Also, I enable magnification in viewDidLoad
.
webView.allowsMagnification = YES;
I also tried the following with no success:
webView.translatesAutoresizingMaskIntoConstraints = NO;
webView.autoresizesSubviews = NO;
webView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
Any hint would be very much appreciated.