Question: this gives me dynamic text height correctly

```
import SwiftUI
struct ContentView : View {
    var body: some View {
        List {
            Text("This is some very long text can we can see scrolls past two lines ").lineLimit(nil)   
        }
    }
}

#if DEBUG
struct ContentView_Previews : PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
#endif

```

[![enter image description here](https://i.stack.imgur.com/ujnBV.png)](https://i.stack.imgur.com/ujnBV.png)

But the following truncates the Text. How do i get dynamic height with the following?

```
import SwiftUI
struct ContentView : View {
    var body: some View {
        GeometryReader { reader in
            ScrollView {
                Text("This is some very long text can we can see scrolls past two lines ")
                    .lineLimit(nil)
                    .frame(width: reader.size.width)
            }
        }
    }
}
#if DEBUG
struct ContentView_Previews : PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
#endif

```

[![enter image description here](https://i.stack.imgur.com/4ZsIq.png)](https://i.stack.imgur.com/4ZsIq.png)

Answer: 
Might be a `ScrollView` bug. I'm honestly not sure why your code doesn't work, but you can get the desired result using:

```
struct ContentView : View {
    var body: some View {
        GeometryReader { reader in
            ScrollView(alwaysBounceVertical: true) {
                ZStack(alignment: .top) {
                    Color.clear.edgesIgnoringSafeArea(.all)
                    Text("This is some very long text can we can see scrolls past two lines ")
                        .lineLimit(nil)
                }.frame(width: reader.size.width, height: reader.size.height)
            }
        }
    }
}

```

I added `alwaysBounceVertical` to the scroll view so you can see that the view scrolls. It's not necessary though.
This appears to have been addressed with iOS 15.0.
But if you want to support users on iOS 14, then you could add a hack view modifier

```
@available(iOS 14.0, *)
fileprivate struct LineLimitHackForiOS14: ViewModifier {

    func body(content: Content) -> some View {
        if #available(iOS 15.0, *) {
            return AnyView(content)
        }
        return AnyView(content.fixedSize(horizontal: false, vertical: true))
    }
}

@available(iOS 14.0, *)
extension View {
    fileprivate func applyHackToPreventTextTruncationInScrollViews() -> some View {
        self.lineLimit(nil).modifier(LineLimitHackForiOS14())
    }
}

```

Where code could be used as

```
Text(self.text).applyHackToPreventTextTruncationInScrollViews()

```