Commit 9026b80b authored by 12579710's avatar 12579710
Browse files

Add new file

parent f11970f3
//
// ContentView.swift
// sign up
//
// Created by Tanya Xaybounheuang on 14/10/20.
// Copyright © 2020 Tanya Xaybounheuang. All rights reserved.
//
import SwiftUI
struct ImageOverlay: View {
@State var username: String = ""
var body: some View {
VStack(alignment: .leading) {
Text("365 Story")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.lineLimit(2)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],250)
Text("Sign Up")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.lineLimit(2)
.frame(maxWidth:900, maxHeight:20)
.padding([.leading, .bottom, .trailing],250)
Text("Username: \(username)")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.top, .leading, .trailing],10)
TextField("Enter username...", text: $username, onEditingChanged: { (changed) in
print("Username onEditingChanged - \(changed)")
})
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],10)
Text("Email: \(username)")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.top, .leading, .trailing],50)
TextField("Enter email...", text: $username, onEditingChanged: { (changed) in
print("Username onEditingChanged - \(changed)")
})
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],10)
Text("Password: \(username)")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.top, .leading, .trailing],50)
TextField("Enter password...", text: $username, onEditingChanged: { (changed) in
print("Username onEditingChanged - \(changed)")
})
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],70)
Text("Confirm Password:\(username)")
.font(.title)
.fontWeight(.bold)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],10)
TextField("Enter password...", text: $username, onEditingChanged: { (changed) in
print("Username onEditingChanged - \(changed)")
}) {
print("Username onCommit")
}
.multilineTextAlignment(.center)
.frame(maxWidth:900, maxHeight:10)
.padding([.leading, .bottom, .trailing],100)
}.padding()
}
}
struct ContentView: View {
var body: some View {
VStack {
Image("moon")
.resizable()
.frame(width: 700, height: 950)
.scaledToFill()
.overlay(ImageOverlay(), alignment: .center)
.aspectRatio(contentMode: .fit)
.foregroundColor(Color.white)}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment