In UIKit there is a UIMenu.Option
.displayInline
to display submenus with separator. Is there a way to do this also in SwiftUI?
Asked
Active
Viewed 560 times
1 Answers
1
You can create Menu
separators with Divider
.
Example:
struct ContentView: View {
var body: some View {
Menu("Hello world!") {
Button("Item 1") {}
Button("Item 2") {}
Divider()
Button("Item 3") {}
Button("Item 4") {}
}
}
}
Result:

George
- 25,988
- 10
- 79
- 133