1

I have create a simple list in swiftUI in order to try the context menu

    var body: some View {
        
        
        
        List {
            ForEach(self.dm.storage) { airportData in
                
                Button(action: {
                    
                }) {
                    ZStack{

                        Text("Hello list")
                    }.contextMenu {
                        Text("Hello")
                    }
                
                }
            }
        }
    }

but when I run the code on the simulator I get this warning from swiftUI.

console warning

any reason why, how can I solve this issue?

thanks for the help

2 Answers 2

2

It's a SwiftUI Bug you don't have to worry about. Similar warnings appear if you use a Toogle for example. This doesn't affect your App and can be ignored (also its annoying to see warnings in the console).

0

This is fixed as of Xcode beta 12.0. This was confirmed by a response today, to my feedback radar sent on April 1st. I then tested it and it all works perfectly now.

No more strange warnings!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.