7

The latest version of macOS Sierra adds a 'Show/Hide tab bar' menu item to the 'View' menu.

View menu item

It does this dynamically.

My application already includes its own tab bar using the MMTabBarView library. I would prefer to continue using this library as it gives me backwards compatibility with tabs, plus the ability to do some customization to tabs.

I'm not seeing anything in apples NSDocument or NSDocumentController documentation on removing this menu item.

Does anyone have any suggestions as to how I can remove it?

NOTE: I do not want to simply disable it, I am looking to remove it completely. (Or I guess not have it added in the first place).

Kyle
  • 17,317
  • 32
  • 140
  • 246
  • Does this answer your question? [How do I disable the Show Tab Bar menu option in Sierra apps?](https://stackoverflow.com/questions/39399553/how-do-i-disable-the-show-tab-bar-menu-option-in-sierra-apps) – ngstschr Dec 26 '20 at 20:21

1 Answers1

13

In Interface Builder, open the attributes of your NSWindow and you'll see an option called "Tabbing Mode". Set it to Disallowed.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
ian
  • 15,686
  • 2
  • 22
  • 18
  • Ahhhh, the window itself. I didn't think of that. Thank you! – Kyle Nov 09 '16 at 14:49
  • 1
    In the SwiftUI you can do `window.tabbingMode = .disallowed` – Derek K Feb 14 '21 at 09:26
  • For `Xamarin.Forms` applications we need to do this in the `AppDelegate` creation of the window and include `TabbingMode= NSWindowTabbingMode.Disallowed`. Making the changes in Xcode has no effect since we are using our own `NSWindow`. – Andrew Truckle Mar 09 '21 at 12:34