I took a screenshot from my device which is iPhone15(screenSize:393×852),and try to display it full screen in SwiftUI with blow code
Image("imageName")
.resizable()
.aspectRatio(contentMode: .fit)
.ignoresSafeArea()
But strange thing is there has a white space at left of the image. Like below
I know change “.fit” to “.fill” will make the image full screen.
But what confuses me is the image size is exactly match the screen, why “.fit” doesn’t work as expected?