Hi. I'm writing the following code for a navigation with images and I have an issue: the images don't fit with the automatic rectangle that is created by the NavigationStack view. Here is the code and I'm attaching an image too for you to understand :
import SwiftUI
struct LycéesListe: View {
var body: some View {
NavigationStack {
List(lycées) { lycée in
NavigationLink {
LycéeDétail(lycée: lycée)
} label: {
LycéesRow(lycée: lycée)
}
}
.navigationTitle("Lycées")
}
}
struct LycéesListe_Previews: PreviewProvider {
static var previews: some View {
ForEach(["iPhone 13", "iPhone 12"], id: \.self) { deviceName in LycéesListe()
.previewDevice(PreviewDevice(rawValue: deviceName))
.previewDisplayName(deviceName)
}
}
}
}
Anyone knows how I could make the images fit with the rectangle border so I just have images with clean rectangles and not these green lines ? I tried to do padding but it didn't help. Any answer appreciated.