0

I am trying to make a TextField in SwiftUI that extends vertically as the user types rather than continuing to the right and scrolling along as the normal behavior is. How would I do this? This is what my current basic TextField is:

TextField("", text: $response)

  .overlay(
    RoundedRectangle(cornerRadius: 5.0)
    .stroke(Color.black, lineWidth: 1)
    .shadow(radius: 5)
  )
  .padding()
Ben O
  • 228
  • 1
  • 15
  • 4
    Does this answer your question? [SwiftUI: How do I make TextField fit multi-line content?](https://stackoverflow.com/questions/58555358/swiftui-how-do-i-make-textfield-fit-multi-line-content) – Chris Mar 10 '20 at 04:56
  • Yeah that's perfect thank you – Ben O Mar 11 '20 at 05:04
  • Actually, that didn't achieve the result that I wanted, but this worked perfectly https://stackoverflow.com/questions/56471973/how-do-i-create-a-multiline-textfield-in-swiftui. – Ben O Mar 31 '20 at 02:56

0 Answers0