Search code examples
objective-ccocoatabspreferences

Cocoa Espresso Style Preference Pane Tabs


Wondering how to implement tabs in the same style as Espresso.app:

Espresso preferences window.

Is there a native class/view to use or is this done with a 3rd party solution?


Solution

  • Unless you want to use a 3rd party solution like BWToolkit, you can simply use a standard NSToolbar, that sends selection notifications to one of your controller classes. You can then use an NSTabView to switch between the panels, and in your IBAction method (that receives selection notifications) you can determine which item is selected, and programmatically switch your NSTabView to the proper index.