Last active
September 1, 2020 03:29
-
-
Save joeyabanks/fe8586f38e01c2d48f6b88a4746cc3dc to your computer and use it in GitHub Desktop.
Revisions
-
joeyabanks revised this gist
Sep 1, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ struct phoneInput: View { Divider() Text("+1") .foregroundColor(Color(UIColor.secondaryLabel)) TextField("(123) 456-7890", text: $input) .keyboardType(.decimalPad) } .frame(height: 24) -
joeyabanks created this gist
Sep 1, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ import SwiftUI import PlaygroundSupport struct phoneInput: View { @State var input = "" var body: some View { VStack { HStack (spacing: 14) { Text("🇺🇸") Divider() Text("+1") .foregroundColor(Color(UIColor.secondaryLabel)) TextField("(123) 456 -7890", text: $input) .keyboardType(.decimalPad) } .frame(height: 24) } .padding(20) .background(Color(UIColor.secondarySystemFill)) .cornerRadius(14) } } struct Screen: View { var body: some View { VStack (alignment: .center, spacing: 24) { Text("Enter your mobile number") .font(.largeTitle) .fontWeight(.semibold) .multilineTextAlignment(.center) Text("We'll text you a verification code. Message and data rates may apply.") .multilineTextAlignment(.center) .foregroundColor(Color(UIColor.secondaryLabel)) phoneInput() Button(action: {}) { Text("Continue") .fontWeight(.semibold) } .padding() .foregroundColor(.white) .frame(maxWidth: .infinity) .background(Color.orange) .cornerRadius(14) } .padding(24) .frame(width: 375, height: 812) .background(Color.black) } } PlaygroundPage.current.setLiveView(Screen())