Posts

Post not yet marked as solved
2 Replies
I recommend that you go through this tutorial, 100 Days of SwiftUI. He shows you exactly what to do in Xcode, which should help you get started. https://www.hackingwithswift.com/100/swiftui
Post not yet marked as solved
1 Replies
Replied In DatePicker
Here is a simple view with 2 DatePickers: import SwiftUI extension Date {     var justDate: String {         let dateFormatter = DateFormatter()         dateFormatter.dateStyle = .long         dateFormatter.timeStyle = .none         return dateFormatter.string(from: self)     } } struct ContentView: View {     @State private var start = Date()     @State private var end = Date()     var body: some View {         List {             Section(header: Text("Select Dates")) {                 DatePicker("Start date", selection: $start, displayedComponents: [.date])                 DatePicker("End date", selection: $end, displayedComponents: [.date])             }             Section(header: Text("Date Values")) {                 Text("Start: \(start.justDate)")                 Text("End: \(end.justDate)")             }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Post marked as solved
1 Replies
To answer my own question, use CMD-Enter.
Post not yet marked as solved
5 Replies
That's very interesting, so you can actually put the UITextFieldDelegate code in it's own section of the file so it is all logically grouped together. I'll try that next time.
Post not yet marked as solved
5 Replies
Thanks Claude, I re-read the section on Extensions and this is what it says at the top of that section: Extensions add new functionality to an existing class, structure, enumeration, or protocol type. This includes the ability to extend types for which you do not have access to the original source code (known as retroactive modeling). So Apple obviously has the source code, that's not why they're doing it. I see how each protocol is a separate extension, that makes sense to me too. But I also see that each operator is also an extension. How does that help?
Post not yet marked as solved
5 Replies
Does it help if I also file a bug?