Skip to content


Subversion checkout URL

You can clone with
Download ZIP
example separating out Preferences from main nib and using tabless view to switch between Preference sections
Objective-C C
branch: master

added readme

latest commit 6ca4150640
@jch authored
Failed to load latest commit information.
English.lproj initial import
preftest.xcodeproj initial import
LICENSE initial import
Preferences.xib initial import
PreferencesController.h initial import
PreferencesController.m initial import
README.markdown added readme
main.m initial import
preftest-Info.plist initial import
preftestAppDelegate.h initial import
preftestAppDelegate.m initial import
preftest_Prefix.pch initial import


Preferences Test

Mac OSX project that demonstrates how to use a separate nib and window controller for Preferences.

Interface Builder

Add a new window xib named "Preferences".


  • Add NSObject to document

    • 6 Class - PreferencesController
  • Main Menu -> Menu Item (Preferences)

    • 5 Sent Actions - PreferencesController -> showWindow:


  • File's Owner

    • 6 Class - PreferencesController (if not set, will not focus on load)
    • 5 window - this nib
  • Window

    • 5 window - File's Owner
  • NSTableView

    • 1 Highlight - Source List
    • 1 Empty - unchecked
    • 1 Headers - unchecked
    • 5 delegate - File's Owner: Preferences Controller
    • 5 data source - File's Owner: Preferences Controller
  • NSTableColumn

    • 1 Editable - unchecked
  • NSTabView (add pref panes to NSTabViewItem children)

    • 1 Style - tabless
    • 1 Default Tab - Twitter (or whatever your default tab should be)
  • NSTabViewItem (as many as you need, edit in NSTableView inspect)

    • 1 Title - rename each title to be more descriptive


  • Add PreferencesController
    • inherit NSWindowController
    • adopt NSTableViewDataSource, NSTableViewDelegate protocols
    • override -(id) init to initWithWindowNibName:@"Preferences"
    • when tableViewSelectionDidChange:, tell tabless NSTabView to switch to corresponding tab.
Something went wrong with that request. Please try again.