I use WKWebView to show svg. It's rather big and i need support of scaling it on pinch gesture. WKWebView do it out of the box. But. It has it's own constraints for min and max zoom scale. For example:
subscribe to WKWebView's scrollView delegate and implement method
optional func scrollViewDidEndZooming(_ scrollView: UIScrollView,
with view: UIView?,
atScale scale: CGFloat)
{
print(self.wkWebView.scrollView.minimumZoomScale, self.wkWebView.scrollView.maximumZoomScale)
self.wkWebView.scrollView.minimumZoomScale = 0.01
self.wkWebView.scrollView.maximumZoomScale = 20.0
}
And in next call it will print: 0.25, 5.0. My values of (0.01, 20.0) are absolutely ignored. Is it a way to correct it?
With deprecated UIWebView there was no such problem. (But there was very unpredictable scaling.)