I’ve an iOS app operating on Mac (it is not operating by Catalyst, it is the iOS app on Mac). It shows some internet content material, together with some inputs. I would prefer to know the way to disable that darkish gray bar that seems on the backside of the app when a WebKit enter is concentrated.
Here is a pattern code that permits you to reproduce the difficulty:
import UIKit
import WebKit
class ViewController: UIViewController {
personal var webView: WKWebView!
override func viewDidLoad() {
tremendous.viewDidLoad()
let configuration = WKWebViewConfiguration()
webView = WKWebView(body: .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 = """
<enter kind="textual content" placeholder="Faucet right here to focus" model="width:100%;font-size:20px;padding:10px;box-sizing:border-box">
"""
webView.loadHTMLString(html, baseURL: nil)
}
}