I know this looks like a simple question one can simply say:
webview.scrollView.scrollEnabled = NO; webview.scrollView.panGestureRecognizer.enabled = NO; web
I found that I had to make my view controller a UIScrollViewDelegate then add this function to prevent scrolling.
UIScrollViewDelegate
func scrollViewDidScroll(_ scrollView: UIScrollView) { scrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: false) }