Hello Dev's around the world.
I'm new using the contextMenu, and I create a card when you tap send you to a view that if you see the code it works with navigationView but if I do a long press using contextMenu it supposed that send me to another view, but I'm using the next code and it doesn't works, it's like a took another card and show me the information of other card. I hope that you can help me, I tried with .sheet and it doesn't work either.
ForEach($list) { $Category in NavigationLink(destination: CategoryList(list: $Category)){ CategoryCard(list: Category) .frame(height: 100) .contextMenu{ Button { selectedEditCategory = Category isPreseingDetailEditCardView.toggle() print(Category.title) } label: { Text("Edit") } } } .background( NavigationLink( destination: DetailCardView(list: $Category), isActive: $isPreseingDetailEditCardView, label: { EmptyView() } ) ) }
Thank you.