If I put multiple horizontal ScrollView
s inside a List
they disappear when scrolling. Here is an example:
Here is the code to reproduce the issue:
struct ContentView: View {
var body: some View {
List {
ForEach(0...100, id: \.self) { _ in
ScrollView(.horizontal) {
HStack {
Rectangle().frame(width: 100, height: 100)
Rectangle().frame(width: 100, height: 100)
Rectangle().frame(width: 100, height: 100)
}
}
}
}
}
}
I am using iOS 13.3. Adding frames to the ScrollView
or HStack
did not help, unfortunately. Does anyone know a way to fix this?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.