I am having problem making my UILabel to react to my UITextView by changing its textColor.
So when there over 250 words in my UITextView, my UILabel will should turn red. But it for some reason doesn't do it.
// class NewAppViewController: UIViewController, UITextViewDelegate...
func textViewDidChange(_ textView: UITextView) {
let characterCounts = commentTextField.text.characters.count
wordCountLabel.text = String(250 - characterCounts)
if (250 - characterCounts) < 0 {
self.wordCountLabel.textColor = UIColor.red
sendButton.isEnabled = false
} else {
sendButton.isEnabled = true
}
}