See if this meets your expectations
Changes:
The outer most is a horizontal scroll view
Inside that you have a vertical scroll view
Move the other content inside the vertical scroll view
var body: some View {
ScrollView(.horizontal) {
ScrollView(.vertical) {
Text("Other content")
.frame(maxWidth: .infinity, minHeight: 100)
.background(Color.yellow)
LazyVGrid(
columns: Array(repeating: GridItem(.fixed(200), spacing: 0, alignment: .center), count: 9),
spacing: 16,
pinnedViews: [.sectionHeaders]
) {
Section(header: header) {
ForEach(1..<500) {
Text("Cell #\($0)")
}
}
}
Text("Other content")
.frame(maxWidth: .infinity, minHeight: 100)
.background(Color.yellow)
}
}
}