0

When I add NavigationLink in SwiftUI, it takes the content into the background. How can I solve this problem?

My code:

 NavigationLink(destination: DrinksList()){
       VStack{
            Image("icecekler")
                 .resizable()
                 .frame(width: 200, height: 200)
                 .cornerRadius(15)

             Text("İçecekler")
                 .font(.title)
                 .bold()

      }
}

Screenshot: enter image description here

2 Answers2

1

apply .buttonStyle(PlainButtonStyle()) on your NavigationLink

Sorin Lica
  • 6,894
  • 10
  • 35
  • 68
1

Here is fix

 NavigationLink(destination: DrinksList()){
       VStack{
            Image("icecekler")
               .renderingMode(.original) // <<< this !!!
Asperi
  • 228,894
  • 20
  • 464
  • 690