Search code examples
cocoapreferencesnstoolbar

Obtain the NSToolbar look of Finder's preferences window


I am building a preferences window for my app and would like to achieve the same "look" as the NSToolbar that Finder uses. When selected, the toolbar buttons in Finder look "pushed in". On the right-hand side of the image is my preferences window - you'll notice that even though General is selected it does not look "pushed in". How do I achieve the look of Finder (and most other built-in apps)?

Thank you, CS

enter image description here


Solution

  • When you build the toolbar in Xcode you add toolbar items to it. Each toolbar item can be customized in the right pane of Xcode. Choose "Selectable" as behaviour and it works as you expect.