NoMachine
NoMachine

Reputation: 167

iOS keyboard dismiss button for custom keyboards

I am creating a custom keyboard extension for iOS 8. I am trying to implement the dismiss/hide keyboard button. I am using UITextDocumentProxy to edit the text and insert characters. How can I implement something like this:

[textView resignFirstResponder];

but for self.textDocumentProxy?

Upvotes: 2

Views: 1692

Answers (1)

rintaro
rintaro

Reputation: 51911

The document says: use - dismissKeyboard method.

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.

Upvotes: 3

Related Questions