Ahmed El-elaimy
Ahmed El-elaimy

Reputation: 35

SwiftUI background Image fullScreen

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.

Upvotes: 2

Views: 2717

Answers (1)

q8yas
q8yas

Reputation: 1137

Try

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

    }

Upvotes: 5

Related Questions