I want to be able to add a onTapGesture{} to a View without overriding the onTapGesture{}s that may be part of the that view already.
Example:
struct NotAPieceOfLettuce: View {
var body: some View{
Text("what am I?").onTapGesture{print("I am not a piece of lettuce")}
}
}
struct Banana: View {
var body: some View{
NotAPieceOfLettuce().onTapGesture{print("just a banana, not lettuce")}
}
}
The code above will actually print just a banana, not lettuce on tap, although I want it to print I am not a piece of lettuce and also just a banana, not lettuce...
I have tried .simultaneousGesture() but the program output is no different than what it is with the example code above.
Thank you for reading, WiseEye YT.
