调用UITextField的becomeFirstResponder()时出现RTIInputSystemClient相关错误的求助
调用UITextField的becomeFirstResponder()时出现RTIInputSystemClient相关错误的求助
我在给UITextField调用becomeFirstResponder()时遇到了这个错误:
-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations
我最初是用这段代码创建文本框的:
textField = UITextField(frame: CGRect(origin: .zero, size:frame.size)) textField.text = "" textField.backgroundColor = UIColor.clear textField.layer.borderWidth = 0 textField.layer.borderColor = UIColor.clear.cgColor textField.layer.backgroundColor = UIColor.clear.cgColor
第一次调用textField.becomeFirstResponder()是正常工作的,但当我点击文本框外部让它失去焦点后,就会弹出上面的错误;之后再点击文本框尝试让它成为第一响应者时,也会出现完全一样的错误。
我已经按照类似帖子的建议关闭了自动校正,但完全没用。我还试过把文本框从父视图中移除……
备注:内容来源于stack exchange,提问作者April G
相关产品推荐
相关产品推荐

