I want to push a View when I tap on an Image. My Code so far:
struct Home: View {
var body: some View {
NavigationView {
VStack {
Image("image")
.onTapGesture {
//navigation code here
}
Text("Tap on image to find details")
}
}
}
}
How to achieve that navigation? Thanks!