struct ContentView: View {
var body: some View {
ZStack{
Image("background").ignoresSafeArea([.all])
}
}
}
tried as [.bottom,.top,..leading,.trailing]
Thanks in advance.
struct ContentView: View {
var body: some View {
ZStack{
Image("background").ignoresSafeArea([.all])
}
}
}
tried as [.bottom,.top,..leading,.trailing]
Thanks in advance.
You need to add resizable modifier on your Image to resize an image to fit its space.
Image("background")
.resizable()
.ignoresSafeArea(.all)
If it still not covering the full screen then add aspectRatio modifier after resizable.
Image("background")
.resizable()
.aspectRatio(contentMode: .fill)
.ignoresSafeArea(.all)