当输入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)