Guitar123
Guitar123

Reputation: 1

Entire Background Area is not tappable in SwiftUI Apple Watch

I'm currently developing an app where in part of it clicking a button will result in a pop up button appearing to confirm that you want the action to be performed. If you want to go back to the original screen the idea was to tap the area of the screen outside of the button and that would take you back to the original screen. Currently only part of the background is tappable and if you try and click the very top or very bottom of the screen it doesn't work. Using Xcode the entire screen is tappable in preview but not in the simulator and therefore doesn't work on an actual Apple Watch. Can someone please advise how to solve this issue. A snapshot of the code can be seen below:

Color.red.opacity(0.3).ignoresSafeArea(.all)
                        .onTapGesture {
                            print("CLICK")
                        }

The code already ignores the safe area and I've tried moving it around in different VStacks and ZStacks but nothing seems to work

Upvotes: 0

Views: 28

Answers (0)

Related Questions