[ad_1]
I need to put a tabView inside a scroll View however once I achieve this the content material of the tabview doesn’t present up despite the fact that it’s there. How can I repair this bug?
import SwiftUI
struct SwiftUIView: View {
@State var selectedFilter = 1
var physique: some View {
VStack {
Colour.blue.body(top: 85) //header
ScrollView {
LazyVStack(spacing: 0, pinnedViews: [.sectionHeaders]) {
Colour.inexperienced.body(top: 100) //view physique
//crimson coloration is tabview header
Part(header: Colour.crimson.body(top: 30)) {
//view content material (THIS DOESNT SHOW)
TabView(choice: $selectedFilter) {
Colour.yellow.body(top: 800).tag(1)
Colour.black.body(top: 800).tag(2)
Colour.indigo.body(top: 800).tag(3)
}
}
}
}
}
}
}
#Preview {
SwiftUIView()
}
[ad_2]