Last active
January 27, 2020 20:47
-
-
Save CyberBison/03ac8a80ef8244f2905648c5bfac668f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct LoginView: View { | |
@State private var username: String = "" | |
@State private var password: String = "" | |
var body: some View { | |
GeometryReader { geometry in | |
VStack{ | |
Image("lock") | |
.resizable() | |
.aspectRatio(contentMode: .fit) | |
.frame(height:(geometry.size.height / 3) ) | |
.clipped() | |
.padding(.bottom, 50) | |
TextField("Username...", text: self.$username) | |
.frame(width: geometry.size.height - 50, height: 30) | |
.foregroundColor(.black) | |
.multilineTextAlignment(.center) | |
.padding() | |
.background(Color(red: 239.0/255.0, green: 243.0/255.0, blue: 244.0/255.0, opacity: 1.0)) | |
.cornerRadius(5.0) | |
SecureField("Password...", text: self.$password) | |
.frame(width: geometry.size.height - 50, height: 30) | |
.foregroundColor(.black) | |
.multilineTextAlignment(.center) | |
.padding() | |
.background(Color(red: 239.0/255.0, green: 243.0/255.0, blue: 244.0/255.0, opacity: 1.0)) | |
.cornerRadius(5.0) | |
Spacer() | |
.frame(height: 20) | |
Button(action: {}) | |
{ | |
Text("Connect!") | |
} | |
.foregroundColor(.white) | |
.padding() | |
.frame(width: 250, height: 60) | |
.background(Color(red: 67/255, green: 110/255, blue: 79/255, opacity: 1.0)) | |
.cornerRadius(15.0) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment