what I have done is provided a small snippet of a code I have written where the user responds to the question through the textbox. As I have coded this for iOS devices, as the user writes their answer - the textbox expands horizontally. Is there any way to change this so the text box increases vertically as they write, so they can see there entire answer. Bearing in mind the user is answering 8/12 mark questions (as this is a revision app), much more space is needed. (I have removes all the code that isn't related to the text box and so a lot has been cut out)
If you could please help me to understand how to best accommodate this code for this issue that would be amazing!
@State private var userAnswer: String = ""
var body: some View {
VStack {
TextField(
"Enter Answer",
text: $userAnswer )
.disableAutocorrection(true)
}
.textFieldStyle(.roundedBorder)
.padding(EdgeInsets(top: 10, leading: 15, bottom: 0, trailing: 15))