21.7 C
Canberra
Tuesday, October 21, 2025

Disable bar that seems on the backside when a WebKit textual content area is concentrated


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)
  }
}

Disable bar that seems on the backside when a WebKit textual content area is concentrated

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles