diff --git a/Reader/Screens/Read/ReadViewController.swift b/Reader/Screens/Read/ReadViewController.swift index a7133cc..0477fc0 100644 --- a/Reader/Screens/Read/ReadViewController.swift +++ b/Reader/Screens/Read/ReadViewController.swift @@ -77,11 +77,14 @@ class ReadViewController: UIViewController { if let content = itemContentHTML() { webView.loadHTMLString(content, baseURL: item.url) } + webView.scrollView.alwaysBounceVertical = true + webView.scrollView.alwaysBounceHorizontal = false view.addSubview(webView) NSLayoutConstraint.activate([ webView.leadingAnchor.constraint(equalTo: view.leadingAnchor), - webView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + // subtract 0.5, because otherwise, on ipad, the web view's scroll content view ends up being wider than the scroll view itself, causing the content to bounce horizontally + webView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -0.5), webView.topAnchor.constraint(equalTo: view.topAnchor), webView.bottomAnchor.constraint(equalTo: view.bottomAnchor), ]) diff --git a/Reader/StretchyMenuInteraction.swift b/Reader/StretchyMenuInteraction.swift index 33b52eb..841af89 100644 --- a/Reader/StretchyMenuInteraction.swift +++ b/Reader/StretchyMenuInteraction.swift @@ -56,7 +56,6 @@ class StretchyMenuInteraction: NSObject, UIInteraction { panRecognizer.delegate = self panRecognizer.allowedScrollTypesMask = [.continuous] view.addGestureRecognizer(panRecognizer) - } private var prevTranslation: CGFloat = 0