Skip to content

Instantly share code, notes, and snippets.

@alyssoncm
Created September 23, 2019 20:51
Show Gist options
  • Save alyssoncm/c31d78dfd34b503501761b4d909be565 to your computer and use it in GitHub Desktop.
Save alyssoncm/c31d78dfd34b503501761b4d909be565 to your computer and use it in GitHub Desktop.
strut4
struct SignUpView: View {
@State var username: String = ""
@State var password: String = ""
@State var email: String = ""
let lightGreyColor = Color(red: 239.0/255.0, green: 243.0/255.0, blue: 244.0/255.0, opacity: 1.0)
let lightBlueColor = Color(red: 36.0/255.0, green: 158.0/255.0, blue: 235.0/255.0, opacity: 1.0)
var body: some View {
VStack{
Text("Sign Up")
.font(.largeTitle)
.foregroundColor(lightBlueColor)
.fontWeight(.semibold)
.padding(.bottom, 20)
TextField("Username", text: $username)
.padding()
.background(lightGreyColor)
.cornerRadius(5.0)
.padding(.bottom, 20)
SecureField("Password", text: $password)
.padding()
.background(lightGreyColor)
.cornerRadius(5.0)
.padding(.bottom, 20)
TextField("Email (optional)", text: $email)
.padding()
.background(lightGreyColor)
.cornerRadius(5.0)
.padding(.bottom, 20)
Button(action: {
}){
Text("Sign Up!")
.font(.headline)
.foregroundColor(.white)
.padding()
.frame(width: 220, height: 60)
.background(lightBlueColor)
.cornerRadius(15.0)
}
}.padding()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment