Dear all,
my question is related to iOS (swift) + wkwebview (without cordova).
When the softkeyboard opens the size of the WKWebview does not change, resulting in issues e.g. in case of searchbars (the searchbar + header can be scrolled out of the visible area).
some pieces of the code:
@IBOutlet weak var webViewContainer:UIView? var webView:WKWebView? @IBOutlet weak var banner:GADBannerView?
generation of the webview:
let webViewCfg = WKWebViewConfiguration()
webViewCfg.userContentController.add(self, name: “native”)webView = WKWebView(frame: webViewContainer!.bounds ,configuration: webViewCfg )
webView?.autoresizingMask = [.flexibleWidth, .flexibleHeight]
webView!.navigationDelegate = self
webView!.uiDelegate = self
webView!.scrollView.bounces = false
webViewContainer?.addSubview(webView!)if let result = components?.url {
let request = URLRequest(url: result)
webView!.load(request)
}
In iOS Simulator + Safari to inspect the webview, I noticed that the size of the webview does not change, when the keyboards is opened.
Is this true? How to handle it?
Best regards
Andreas