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

I can't figure this out. Any help would be appreciated!

Box House
  • 137
  • 1
  • 1
  • 12

1 Answers1

4

UITextField can only display a single line. If you want multiple lines of editable text, you must use UITextView instead.

rob mayoff
  • 358,182
  • 62
  • 756
  • 811