I have simple view.
var body: some View {
NavigationView {
ZStack {
ScrollView {
GeometryReader { geometry in
CardView(geometry: geometry)
.onTapGesture {
print("Tapped")
}
}
.padding()
}
}
}
When I m tapping on the card, nothing is getting printed. However if I change scrollView to VStack for instance, I instantly get Tapped on the console. What is happening? How can I implement tap gesture on my cards which are inside scrollView?