Skip to content

Commit

Permalink
Update ContentView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
mertala committed Oct 11, 2019
1 parent eb32c68 commit 49840cb
Showing 1 changed file with 43 additions and 9 deletions.
52 changes: 43 additions & 9 deletions Textfield-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,49 @@
//

import SwiftUI

struct ContentView: View {
var body: some View {
Text("Hello World")
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()

@State var email: String = ""
@State var sifre: String = ""


var body: some View
{

VStack {

TextField("Email gir", text: $email)

.textFieldStyle(RoundedBorderTextFieldStyle())
.padding()
.frame(width: 300, height: 60)
.shadow(radius: 5.0)
.keyboardType(UIKeyboardType.emailAddress)

SecureField("Şifre gir", text: $sifre)

.padding()
.textFieldStyle(RoundedBorderTextFieldStyle())
.frame(width: 300, height: 60)
.padding(.bottom, 10)
.shadow(radius: 5.0)
.keyboardType(UIKeyboardType.numberPad)


Button(action: {}) {

HStack {

Text("Giriş")}

.frame(minWidth: 0, maxWidth: .infinity)
.padding()
.foregroundColor(.white)
.background(Color.green)
.frame(width: 300, height: 60)
.cornerRadius(30.0)
.shadow(radius: 5.0)
}
}
}
}

0 comments on commit 49840cb

Please sign in to comment.