Another simple SwiftUI tasks that is causing me more trouble than it should.
I can't figure a way to align the Text and TextField correctly.
None of the HSTack alignment seem to yield acceptable results.
import SwiftUI
struct SignIn: View {
@State var email: String = ""
var body: some View {
VStack {
Text("Sign In")
.font(.largeTitle)
Form {
Section {
HStack {
Text("ID")
TextField("Email", text: $email)
}
}
}
}
}
}
struct SignIn_Previews: PreviewProvider {
static var previews: some View {
SignIn()
}
}
