Swift 4 - \n 不工作。我怎样才能把它转到另一条线。

Swift 4 - \n not working. How can I make this to another line.

var welcomeText: UITextField = {
    let textField = UITextField()
    textField.layer.cornerRadius = 25
    textField.text = "Hello, are you \n Im doing good! "
    textField.textColor = .white
    return textField
}()

我想不通。如有任何帮助,我们将不胜感激!

UITextField只能显示一行。如果您想要多行可编辑文本,则必须改用 UITextView