SwiftUI DatePicker generating 200 line AutoLayout errors?

110 Views Asked by At

I'm getting 200 lines of AutoLayout errors in the console from SwiftUI's DatePicker. Looks like something to do with the label. In testing, this is happening in a blank project with nothing else in the view.

The logs are annoying but the more concerning part is it causes a long hitch in my app before the view is shown.

Is this happening to anyone else or am I missing something? Had trouble finding anything online about it. Not sure where to start or if there's anything I can even do about it.

To test, make a blank SwiftUI project, write the ContentView as such, and run:

struct ContentView: View {
    @State private var startTime: Date = Date()
    
    var body: some View {
        DatePicker("Test", selection: $startTime, displayedComponents: .hourAndMinute)
            .onChange(of: startTime) { newTime in
                print(newTime)
            }
    }
}
0

There are 0 best solutions below