Button's tap event is not working when keyboard appears

107 views Asked by At

I'm implementing a chatting feature, and I'm facing a problem that SendButton in InputBarAccessoryView doesn't click when the keyboard is up. When the keyboard goes down the button is clicked only then. I don't know why.

extension ChatViewController: InputBarAccessoryViewDelegate {
  func inputBar(_ inputBar: InputBarAccessoryView, didPressSendButtonWith text: String) { 
  ... not working when keyboard is up ... }
}
1

There are 1 answers

0
Observer23 On

Maybe InputBarAccessoryView not being properly connected to the ChatVC in the storyboard or through code check that the InputBarAccessoryView's delegate is set to the ChatVC