I would like to create a menu at the import/export location.
CommandGroup(replacing: CommandGroupPlacement.importExport) {
CommandMenu("Import"){
Button("Format I (.f1)"){
print("import Format 1")
}
Button ("Format II (.f2)") {
print("import Format 2")
}
}
}
Unfortunately, CommandMenu isn't a View but a Command. So, how do I combine these two?
Try the following
CommandGroup(replacing: CommandGroupPlacement.importExport) {
Menu("Import") { // << here !!
Button("Format I (.f1)"){
print("import Format 1")
}
Button ("Format II (.f2)") {
print("import Format 2")
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With