I have a really simple app where I am trying to scroll full page between images. However the if I use a LazyHStack the scrolling stops working if a child item is full screen. LazyVStack has the same issue if the content is full screen then scrolling stops working. Normal stacks work but that defeats the purpose since all items have to load. Oh this need to scroll horizontally.
Code is so:
struct ContentView: View {
var body: some View {
GeometryReader { geometry in
ScrollView(.horizontal) {
LazyHStack {
ForEach(1...50, id: \.self) { index in
Button(action: {}){ Text("\(index)")}
.frame(width: geometry.size.width, height: geometry.size.height)
}
}
}
}
.ignoresSafeArea()
}
}