问题
For some reason the picker in my SwiftUI Form turns gray after I select a value.
My code:
Form {
Section {
TextField("title", text: $title)
Picker(selection: $category, label: Text("category")) {
ForEach(0..<categories.count) { index in
Text(categories[index]).tag(index)
}
}
}
}
来源:https://stackoverflow.com/questions/65405759/picker-in-swiftui-form-turns-gray-after-selecting-a-value