I have an iOS app running on Mac (it’s not running through Catalyst, it’s the iOS app on Mac). It displays some web content, along with some inputs. I’d like to know how to disable that dark grey bar that appears at the bottom of the app when a WebKit input is focused.
Here’s a sample code that allows you to reproduce the issue:
import UIKit
import WebKit
class ViewController: UIViewController {
private var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
let configuration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: configuration)
webView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(webView)
NSLayoutConstraint.activate([
webView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
let html = """
"""
webView.loadHTMLString(html, baseURL: nil)
}
}
