When updating a UITextView text, I found that textView.text += "..." not working. The compiler warned me that the binary operator + = cannot be applied to operands of type String! "and" String ". It seems that I should add an exclamation mark after textView.text .
However, if I expanded it to textView.text = textView.text + "..." , it worked. I wonder if it was designed that way, or did I misunderstand something?
source share