Out of nothing I got this error Expression type \'@lvalue String?\' is ambiguous without more context in my code:
if textView.text != \"\" &
Two things are wrong:
textView.text != ""
You are comparing an optional String with a non-optional one.
Replace by:
if let text = textView.text, text != ""
Then in your constructor, don't unwrap the text!
If you want keep the optional :
self.text = text ?? "" //will avoid crash
Or better:
init(text: String = "")