I wish to show the choice when utilizing a picker in menu like within the reminders app for Kind By and I can not for the lifetime of me determine find out how to do it.
That is what I would like:
https://i.stack.imgur.com/Lwm2R.jpg
That is my code:
personal func menuButton() -> some View {
Menu {
Menu {
Picker(choice: $group, label: Textual content("Grouping choices")) {
Textual content("None").tag(0)
Textual content("Sort").tag(1)
}
} label: {
Label("Group By", systemImage: "sq..grid.3x1.beneath.line.grid.1x2")
}
Menu {
Picker(choice: $kind, label: Textual content("Sorting choices")) {
Textual content("Title").tag(0)
Textual content("Precedence").tag(1)
}
} label: {
Label("Kind By", systemImage: "arrow.up.arrow.down")
}
Divider()
Button {
toggleInbox()
} label: {
Label(inboxList?.isHidden == false ? "Cover Inbox" : "Present Inbox", systemImage: inboxList?.isHidden == false ? "eye.slash" : "eye")
}
} label: {
Picture(systemName: "ellipsis.circle.fill")
.font(.customized("Button", measurement: 22))
.foregroundStyle(.blue, Coloration(UIColor.systemGray5))
}
}