You would use a Picker.
For example:
Picker("Menu picker", selection: $selection) {
ForEach(1..<5, id: \.self) { number in
Label("\(number)", systemImage: "\(number).circle")
}
}
.pickerStyle(MenuPickerStyle()) // makes the picker appear as a menu
If you want the picker to be embedded inside the menu do this:
Menu("Picker inside menu") {
Text("Menu item 1")
Text("Menu item 2")
Divider()
Picker(...) { ... }
.pickerStyle(MenuPickerStyle()) // apply this if you want the picker to show as a sub-menu
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: