We shall now create the interface by implementing the program
code in the file named NewDefaults.h
in our Xcode project:
Open the NewDefaults project in Xcode.
Click on the item named
NewDefaults.h
and add a new interface definition and the button action interface definition for the preference pane as shown in the following program code:#import <PreferencePanes/PreferencePanes.h> @interface NewDefaults : NSPreferencePane { /* Create the user interface elements */ // Buttons - A Check Box is a button IBOutlet NSButton* enableHiddenFilesCheckbox; IBOutlet NSButton* enableLaunchpadFadeCheckbox; IBOutlet NSButton* enableHomeLibraryCheckbox; } - (void)mainViewDidLoad; /* Create the Preference Pane interface for the buttons */ - (IBAction)myButtonAction:(id)sender;