0
votes

I have created a toolbar via IB and have a simple View menu with the "Show Toolbar" and "Customize Toolbar" menu items. Both work exactly as I would like them to.

But, I cannot seem to get the Toolbar Button to show up in the title bar of the NSWindow.

I have tried setting the "Shows Toolbar Button" in IB... no luck.

I have tried calling setShowsToolbarButton in the window controller's awakeFromNib

NSLog(@"showsToolbarButton: %@\n",[[self window]showsToolbarButton]?@"YES":@"NO");
[[self window]setShowsToolbarButton:YES];
NSLog(@"showsToolbarButton: %@\n",[[self window]showsToolbarButton]?@"YES":@"NO");

Again, no luck. Both log entries show "NO" and there is no button.

Has this feature gone away? If not, what is the proper way to get that button to show up?

I'm building for OSX 10.6 and newer using Xcode 5.0.2 on a machine running 10.9.

Thanks for any/all insights.

1

1 Answers

3
votes

The button to hide and show the toolbar was commonly seen as a small capsule button in the upper right corner at least through 10.6 Snow Leopard. It is no longer present in standard OS X windows. Ostensibly this is still in Xcode for supporting projects targeting older versions of OS X.

You can probably still create your own button and set its action to the same selectors, but you would likely need to create a custom window using NSBorderlessWindowMask to get the button in the title bar where it used to be.

In its place for the last several OS X versions you will find the full screen button instead.