Open mchirico opened 3 years ago
Video Day 42
Take your time... go slow... you're doing this for yourself, so you want quality.
https://github.com/mchirico/iOSurl
@State var label: String = "Nothing yet..." @State var txt: String = "..." @State var selectedDate = Date()
// // ContentView.swift // Day42 // // Created by Mike Chirico on 11/23/20. // import SwiftUI struct ContentView: View { @State var label: String = "Nothing yet..." @State var txt: String = "..." @State var selectedDate = Date() var body: some View { Text(self.txt) .padding() TextField(/*@START_MENU_TOKEN@*/"Placeholder"/*@END_MENU_TOKEN@*/, text: $txt) .padding(.vertical) .frame(width: 300.0, height: 132.0) .background(Color.blue) .foregroundColor(Color.yellow) .cornerRadius(15) .shadow(radius: 15) .font(Font.custom("Avenir-Black", size: 57)) DatePicker(selection: $selectedDate, label: { /*@START_MENU_TOKEN@*/Text("Date")/*@END_MENU_TOKEN@*/ }) Button(action: { self.txt = "\(self.selectedDate)" }) { Text("button") .padding([.leading,.trailing],30) .padding([.top,.bottom],20) .background(Color.green) .foregroundColor(Color.black) .cornerRadius(25) .shadow(radius: 25) .font(Font.custom("Avenir-Black", size: 17)) } Button(action: { self.txt = "\(self.selectedDate)" }) { Text("button") .padding([.leading,.trailing],30) .padding([.top,.bottom],20) .background(Color.green) .foregroundColor(Color.black) .cornerRadius(25) .shadow(radius: 25) .font(Font.custom("Avenir-Black", size: 17)) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
mchirico, Thanks for opening this issue!
shft-ctl-cmd-4 (to capture screen)
keeps saying error
Video Day 42
Take your time... go slow... you're doing this for yourself, so you want quality.
Reference
https://github.com/mchirico/iOSurl
Code Reference