Messagekit: How to close keyboard without it reopening?

Created on 2 Mar 2018  路  4Comments  路  Source: MessageKit/MessageKit

Question

How does one close the keyboard?

What happened?

Currently I use view.endEditing(true) but as soon as the messages view is reloaded the keyboard comes back...

What did you expect to happen?

It to be gone until the input is clicked again.

question

Most helpful comment

I thought you wanted to close the keyboard so it was gone. If you just want it dismissed call resignFirstResponder on the InputTextView in the MessageInputBar

Sent with GitHawk

All 4 comments

Call resignFirstResponder on the view controller itself

Sent with GitHawk

self.resignFirstResponder()
@nathantannar4 that made the entire input bar go away...

switching it to self.messageInputBar.resignFirstResponder() doesn't work either.
Maybe I misunderstood where you wanted that to be called

I thought you wanted to close the keyboard so it was gone. If you just want it dismissed call resignFirstResponder on the InputTextView in the MessageInputBar

Sent with GitHawk

:) yes that worked perfectly!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yspreen picture yspreen  路  3Comments

NiklasWilson picture NiklasWilson  路  4Comments

brandon-haugen picture brandon-haugen  路  3Comments

mlequeux picture mlequeux  路  3Comments

ichikmarev picture ichikmarev  路  4Comments