Search code examples
macosswiftuimenu

SwiftUI mac remove close item from files menu


In the file menu in every mac app, you will have this close menu item:

close menu item

How can I remove it in swiftUI?

Or is there a CommandGroupPlacement corresponding to it?


Solution

  • CommandGroupPlacement.saveItem:

    Includes the following by default on macOS:

    • Close
    • Save
    • Save As/Duplicate
    • Revert to Saved