1

これは WKWebView の私の設定です:

func setupWebView() -> WKWebView {
    let configutation = WKWebViewConfiguration()
    configutation.selectionGranularity = .Character
    
    let webView = WKWebView(frame: CGRect(x: 0, y: 20, width: UIScreen.mainScreen().bounds.size.width, height: UIScreen.mainScreen().bounds.size.height),
                              configuration: configutation)
    
    view.addSubview(webView)
    return webView
}

次に、lazy を使用して取得しました。

lazy var webView: WKWebView = self.setupWebView()

デバイスまたはシミュレータの両方で同じ問題:

ここに画像の説明を入力

プロパティを .Dynamic に設定するとうまくいきます。

ここに画像の説明を入力

しかし、選択スタイルは必要ありません。

ここに画像の説明を入力

誰も問題を解決する方法を知っていますか?

どうもありがとう!

4

1 に答える 1