0

This is my View:

@State private var descriptionService: String = "Hello Tim it doesnt work at all"
TextField("description".localized, text: $descriptionService, axis: .vertical)
    .multilineTextAlignment(.center)
    .padding()
    .lineLimit(3...7)

And this is the result:

enter image description here

According to the axis parameter the text field should be multilined, but it is not. Why is this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
  • Would you expand what "doesn't work" means in the context of this problem? Please add the information into the question itself, by way of an edit. – halfer Feb 10 '23 at 14:26
  • @halfer have you read the question carefully? If yes, then you could see that it doesnt work because question says about multiline text field. But there is only one line. Should be more, but it is one. Why? – Bartłomiej Semańczyk Feb 11 '23 at 06:48
  • The amendment to the question is an improvement. Perhaps the subtext was not clear - avoid the phrase "doesn't work" at all costs in your questions. It is often said on Stack Overflow that it is the least helpful fault report possible. – halfer Feb 11 '23 at 11:07
  • 1
    Ok, I understand. Doesn't work - do not use it. – Bartłomiej Semańczyk Feb 11 '23 at 13:25

0 Answers0