小编mne*_*1ck的帖子

当键盘弹出时,WKWebView会限制问题

当输入WKWebView聚焦时,弹出约束错误.

码:

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad();
        let wv = WKWebView(frame: CGRect(x: 100, y: 100, width: 100, height: 100));
        wv.loadHTMLString("<input type='text'/>", baseURL: nil); // it also can be select, it makes no difference
        view.addSubview(wv);
    }
}
Run Code Online (Sandbox Code Playgroud)

错误日志:

2017-11-05 00:26:28.861439+0700 achievator[20048:75393577] [LayoutConstraints] Unable to simultaneously satisfy constraints.    Probably at least one of the constraints in the following list is one you don't want.   Try this:       (1) look at each constraint and try to figure out …
Run Code Online (Sandbox Code Playgroud)

ios swift wkwebview

13
推荐指数
1
解决办法
4107
查看次数

标签 统计

ios ×1

swift ×1

wkwebview ×1