How can I make the sign in view expand so that its left side is constrained to the left side and its right side is constrained to the right side as well?
import SwiftUI
struct Intro: View {
var body: some View {
ZStack {
Image("IntroImage")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(alignment: .center)
VStack {
Spacer()
Button(action: {}, label: {
Text("Sign in")
.foregroundColor(Color.black)
.padding()
.background(Color.green)
})
}
}
.ignoresSafeArea()
}
}
struct Intro_Previews: PreviewProvider {
static var previews: some View {
Intro()
}
}
I am using a 640 × 1136 png for the image. I am testing it on all devices including iPhone 11.