SwiftUI background Image fullScreen

Viewed 2154

I am trying to make the background of screen to be Image not color. I want to know what should be the image sizes, and what to change in these values.

GeometryReader { geometry in
             ZStack {
                Image("Home-BG")
                .resizable()
                .edgesIgnoringSafeArea(.all)
                .aspectRatio(contentMode: .fill)

I want the image to be fit to screen in all iphone and ipad available devices.

1 Answers

Try

    ZStack {            
        Image("BackGroundImage")
            .resizable()
            .edgesIgnoringSafeArea(.all)

    }
Related