<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenu/setMenuBarVisible(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMenu(cm)setMenuBarVisible:"
  },
  "title" : "setMenuBarVisible(_:)"
}
-->

# setMenuBarVisible(_:)

Sets whether the menu bar is visible and selectable by the user.

```
class func setMenuBarVisible(_ visible: Bool)
```

## Parameters

`visible`

<doc://com.apple.documentation/documentation/Swift/true> if the menu bar should be visible and selectable, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)