In SwiftUI, I'm using the default Picker
like this:
Picker("Choose option", selection: $selectedRateID) {
ForEach(model.rates, id: \.id) {
Text($0.title).tag($0.id)
}
}
The picker renders to this:
When I try to select an option, the detail screen looks like this:
Is there a way to make the picker options detail screen use the InsetGroupedListStyle
like this:
I tried adding .listStyle(InsetGroupedListStyle())
to the ForEach
, Picker
, and other nodes, but it did not work. Any idea on how to achieve this? (And why is there so much space above it with no title?)