jessesquires / JSQMessagesViewController

An elegant messages UI library for iOS

Home Page:https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send button is active even textfield is empty.

yatanadam opened this issue · comments

commented

First time view appear, the textfield is empty and send button is inactive.
But after sending first message textfield becomes empty but send button is still active.
So user can send empty message.
How to fix that ?

Thanks.

Use this:
override func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text:

and then:
if !inputToolbar.contentView.textView.hasText() {
textView.resignFirstResponder()
}

// Its a bit rough and cant handle all cases but will work

@yatanadam, thanks for submitting the issue. Do you have more information on how to replicate the problem? That would be great if you can replicate in the demo project. 😃

Hello everyone!

I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:

http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊

Thanks for understanding,
— jsq