SwiftUI List Row Not Rendering Dynamic Height Properly on iOS 17
This might be a silly question, but I need some guidance on I'm performance testing and I'm working with an scenario where a `List` row in my SwiftUI app is not resizing correctly based on the dynamic content height... I have a `List` that displays a collection of items, each with a variable height based on the text content. However, on iOS 17, some rows display incorrectly, with a fixed height that doesn't account for the text's size. I've tried using the `fixedSize(horizontal:vertical:)` modifier on the text views to allow them to expand, but the scenario continues. Hereβs a simplified version of my code: ```swift struct MyItem: Identifiable { let id = UUID() let title: String } struct ContentView: View { let items: [MyItem] = [ MyItem(title: "Short title"), MyItem(title: "This is a much longer title that should take more space and require the cell to grow in height.") ] var body: some View { List(items) { item in Text(item.title) .fixedSize(horizontal: false, vertical: true) .padding() } } } ``` I also attempted to set the row height using `.listRowInsets(EdgeInsets())`, but this didn't help either. When I test the app, I still see that some rows are cut off and I get the following warning in the console: "`List` has an invalid height for one of its rows." I've confirmed that my `Text` views are not exceeding the available space, and I also tried wrapping the `Text` in a `VStack` with the same modifiers, but the behavior remains unchanged. This scenario didn't occur in previous iOS versions, so I'm wondering if it's a bug with iOS 17 or if there's a specific change I need to implement to get dynamic heights working as expected. Any tips or workarounds would be greatly appreciated! I'm working in a Ubuntu 22.04 environment. Has anyone dealt with something similar? This is part of a larger CLI tool I'm building. How would you solve this? I'm working in a Windows 11 environment. I'd be grateful for any help.