Why does the height of Text SwiftUI View expand correctly to allow for displaying the content when setting the width but it collapses to a single line when setting the maxWidth of it's frame?
struct ContentView: View {
var body: some View {
VStack {
Text("Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text")
.background(Color.blue)
Text("Short Text")
.background(Color.green)
}
// .frame(width: 400)
// .frame(maxWidth: 400)
.fixedSize()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
with .frame(width: 400):
![width[1]](https://i.stack.imgur.com/lWd5e.png)
with .frame(maxWidth: 400):
