Reputation: 35
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
Reputation: 1137
Try
ZStack {
Image("BackGroundImage")
.resizable()
.edgesIgnoringSafeArea(.all)
}
Upvotes: 5