Q-Mobile / QGrid

🎛 QGrid: The missing SwiftUI collection view.
MIT License
1.64k stars 104 forks source link

Wrapping the GridCell in a NavigationLink does not display the image #7

Closed alancook closed 4 years ago

alancook commented 4 years ago

struct GridCell: View { var person: Person

var body: some View { NavigationLink( destination: Text("") ) { VStack() { Image(person.imageName) .resizable() .scaledToFit() .clipShape(Circle()) .shadow(color: .primary, radius: 5) .padding([.top, .leading, .trailing], 7) Text(person.firstName).lineLimit(1) Text(person.lastName).lineLimit(1) } .font(.headline).foregroundColor(.white) } } }

Screen Shot 2019-09-15 at 2 33 21 PM

alancook commented 4 years ago

Another Apple bug it seems tried this with GridStack GItHib project with the same result.

alancook commented 4 years ago

Seem when you have a NavbigationLink you need to set the image to Render as Original this fixes the problem