I have a custom keyboard with a WKWebView in full width and height. I have disabled the scroll via wkWebView!.scrollView.scrollEnabled = false
but I still have a strange scroll behavior at double-tap on the bottom of the WKWebView. Here the source-code of the simple webpage I try to load : http://is.gd/gt8h2q (very simple, just a div full screen with background green and one line of text). Below, a GIF as explanation. Here is how I create the WKWebView :
class KeyboardViewController: UIInputViewController, WKScriptMessageHandler {
var wkWebView: WKWebView?
override func loadView() {
super.loadView()
let contentController = WKUserContentController()
contentController.addScriptMessageHandler(self, name:"callbackTestOne")
let config = WKWebViewConfiguration()
config.userContentController = contentController
self.wkWebView = WKWebView(frame:self.view.frame, configuration:config)
self.view = self.wkWebView!
}
override func viewDidLoad() {
super.viewDidLoad()
(...)
wkWebView!.scrollView.bounces = false
wkWebView!.scrollView.scrollEnabled = false
wkWebView!.scrollView.backgroundColor = UIColor(red:248, green:248, blue:248, alpha:1)
wkWebView!.scrollView.opaque = true
wkWebView!.scrollView.showsHorizontalScrollIndicator = false
wkWebView!.scrollView.showsVerticalScrollIndicator = false
wkWebView!.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal
}
(...)