I encountered the same problem
this Demo
var body: some View {
ZStack {
ScrollView {
Text("preView ScrollView")
.frame(height: 1000)
.background(Color.blue)
}
VStack {
Text(" ")
.frame(width: /*@START_MENU_TOKEN@*/100/*@END_MENU_TOKEN@*/, height: 100)
.contentShape(Rectangle())
.onTapGesture {
print("xxxxxx")
}
}
}
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: