我正在为 iOS 8 创建自定义键盘扩展。我正在尝试实现关闭/隐藏键盘按钮。我正在使用 UITextDocumentProxy 来编辑文本并插入字符。我怎样才能实现这样的事情:
[textView resignFirstResponder];
但是对于self.textDocumentProxy
?
最佳答案
文档说:使用- dismissKeyboard
方法。
Because a custom keyboard does not have access to the current text input object, you cannot send it a resignFirstResponder message (as you would to dismiss the system keyboard when you are developing an app with text entry). To dismiss the custom keyboard, call dismissKeyboard instead.
关于iOS 自定义键盘的键盘关闭按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25294247/