Skip to content

Instantly share code, notes, and snippets.

@barrault01
Created March 30, 2022 08:25
Show Gist options
  • Save barrault01/af65009d3e42f8b23ad30e82992fc6c2 to your computer and use it in GitHub Desktop.
Save barrault01/af65009d3e42f8b23ad30e82992fc6c2 to your computer and use it in GitHub Desktop.
Logging Screen
struct ContentView: View {
@ObservedObject var user = User()
var body: some View {
VStack {
HStack {
Text("Username:")
TextField("", text: $user.username)
.textFieldStyle(.roundedBorder)
}
.padding()
HStack {
Text("Password:")
SecureField("", text: $user.password)
.textFieldStyle(.roundedBorder)
}
.padding()
Toggle("Protect with Face ID", isOn: $user.protectWithTouchID)
.padding()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment