so I have a TabView like shown below, but when I try to implement it in a ScrollView I always have to give it a fixed height. Is there a way of telling the tabview to use the space it needs in the scrollView? I don't know the height of the inner content (which btw. changes over time) of the TabView, so a fixed height doesn't work for me.
I tried .frame(maxHeight: .infinity), but that doesn't seem to work
import SwiftUI
struct TEST: View {
var body: some View {
ScrollView {
TabView {
Text("Hello World")
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
.frame(maxHeight: .infinity)
// only .frame() with fixed Height works...
}
}
}