I have a Text and DatePicker that are supposed to go in the same row, but the row simply does not appear on iOS 15. When I put an Image instead of Text it works just fine. Other objects that prevent the row from showing up are Button and Label.
I've tried this both in sim and physical device but see the same result. iOS 16+ shows the row as expected.
Here's the sample code:
struct TestView: View {
var body: some View {
Form {
Section {
VStack {
Text("This text prevents the row from showing up.")
DatePicker("", selection: .constant(Date()), displayedComponents: .date)
.datePickerStyle(.graphical)
}
}
}
}
}
struct TestView_Previews: PreviewProvider {
static var previews: some View {
TestView()
}
}