Use a Menu
with a inline Picker
as its content:
Menu {
Picker(selection: $fruit, label: EmptyView()) {
ForEach(fruits, id: \.self) { fruit in
Text(fruit)
}
}
.labelsHidden()
.pickerStyle(InlinePickerStyle())
} label: {
HStack {
Text("Picked:")
Text(fruit)
}
}
3
solved Display Multiple views in Picker