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
  • 167
  • 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
  • 375,296
  • 67
  • 796
  • 848