Jump To:
Leopard Reference Library: Cocoa
User experience encompasses the visual appearance, interactive behavior, and assistive capabilities of software. From an application's graphical user interface to its use of additional technologies such as speech recognition and speech synthesis, a cohesive and professional user experience is what Mac users have come to expect. Cocoa provides a complete suite of Interface Builder palettes and programmatic interfaces that developers can use to deliver this experience in their applications.

View all User Experience Reference Library.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Resource Type
Sort by
Date
NSToolbarItemValidation Protocol Reference (HTML) (PDF)
Describes the interface for providing customized enabling and disabling of a toolbar item.
Reference 2006-05-23
NSToolTipOwner Protocol Reference (HTML) (PDF)
Describes the interface for receiving requests for tooltip text.
Reference 2006-05-23
NSUserInterfaceValidations Protocol Reference (HTML) (PDF)
Describes the interface for participating in automatic enabling and disabling of controls.
Reference 2006-05-23
NSViewAnimation Class Reference (HTML) (PDF)
Describes an animation in a view or window.
Reference 2006-05-23
NSWindowScripting Protocol Reference (HTML) (PDF)
Describes the category on NSWindow for scripting basic properties and commands of windows in scriptable applications.
Reference 2006-05-23
Preference Panes Framework Reference (HTML) (PDF)
Describes the Objective-C API for supporting and working with preference panes.
Reference 2006-05-23
Screen Saver Framework Reference (HTML) (PDF)
Describes the Objective-C API for supporting and working with screen effects.
Reference 2006-05-23
Screen Saver Functions Reference (HTML) (PDF)
Describes functions and function-like macros available in the Screen Saver framework.
Reference 2006-05-23
ScreenSaverDefaults Class Reference (HTML) (PDF)
Describes the class that defines a set of methods for saving and restoring user defaults for screen savers.
Reference 2006-05-23
ScreenSaverView Class Reference (HTML) (PDF)
Describes the class that defines the interface for subclassers to interact with the screen saver infrastructure.
Reference 2006-05-23
WebDocumentRepresentation Protocol Reference (HTML) (PDF)
Describes the protocol adopted by document representation classes that handle specific MIME types.
Reference 2006-05-23
WebDocumentSearching Protocol Reference (HTML) (PDF)
Describes the protocol adopted by document view objects to support searching.
Reference 2006-05-23
WebUndefined Class Reference (HTML) (PDF)
Describes the class used to represent the JavaScript "undefined" value.
Reference 2006-05-23
NSTableView Class Reference (HTML) (PDF)
Describes a view that displays and manages tabular data.
Reference
DiscRecording Release Notes (HTML)
Updated for Mac OS X v10.5
Release Notes 2007-10-31
Preference Panes Reference Update (HTML) (PDF)
Summarizes the symbols added to the Preference Panes framework.
Release Notes 2007-07-18
SearchKit Release Notes (HTML)
Release Notes 2005-04-29
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Sample Code 2008-08-29
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
Sample Code 2008-07-25
SpotlightFortunes (HTML) (DMG) (ZIP)
Demonstrates how to provision a Spotlight importer plug-in for a custom UTI, and how to use a NSMetadataQuery with bindings to display live query results in a table view.
Sample Code 2008-06-06
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
Sample Code 2008-03-17
CarbonCocoaTempConverter (HTML) (DMG) (ZIP)
Demonstrates how to integrate Carbon and Cocoa user interfaces in the same Cocoa application.
Sample Code 2008-03-10
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Sample Code 2008-03-05
IconCollection (HTML) (DMG) (ZIP)
Demonstrates how to use NSCollectionView along with NSWorkspace and named images to determine its content.
Sample Code 2008-01-18
DictionaryController (HTML) (DMG) (ZIP)
"DictionaryController" is a Cocoa application that demonstrates various ways in how to use the NSDictionaryController class.
Sample Code 2007-12-20
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
Sample Code 2007-11-15
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Sample Code 2007-11-02
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
Sample Code 2007-10-30
BundleLoader (HTML) (DMG) (ZIP)
Demonstrates how to load multiple Cocoa bundles or NSBundles (also known as plug-ins) into the main NSApplication.
Sample Code 2007-09-21
DockTile (HTML) (DMG) (ZIP)
Demonstrates how to customize your application's icon in the Dock by using the NSDockTile class.
Sample Code 2007-09-11
SimpleCocoaApp (HTML) (DMG) (ZIP)
A basic Cocoa application for beginners to Cocoa and Objective-C.
Sample Code 2007-08-07
JavaFrameEmbedding example (HTML) (DMG) (ZIP)
Small Cocoa application that demonstrates how to use JavaFrameEmbedding.framework
Sample Code 2007-06-12
LayerBackedOpenGLView (HTML) (DMG) (ZIP)
"LayerBackedOpenGLView" provides a simple example of hosting Cocoa controls as subviews of an NSOpenGLView.
Sample Code 2007-06-12
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
Sample Code 2007-06-11
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
Sample Code 2007-06-11
MenuItemView (HTML) (DMG) (ZIP)
Demonstrates embedding an NSView inside a menu item or NSMenuItem.
Sample Code 2007-06-11
ViewController (HTML) (DMG) (ZIP)
Demonstrates how to use "NSViewController".
Sample Code 2007-06-11
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Sample Code 2007-06-07
PredicateEditorSample (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPredicateEditor class.
Sample Code 2007-06-06
PrefsPane (HTML) (DMG) (ZIP)
A Cocoa sample System Preferences bundle that demonstrates how to use the NSPreferencePane class.
Sample Code 2007-06-06
SpeedometerView (HTML) (DMG) (ZIP)
Shows how to make a custom NSView.
Sample Code 2007-06-06
TextLayoutDemo (HTML) (DMG) (ZIP)
Customizing NSTextView with NSLayoutManager and a custom NSTextContainer.
Sample Code 2007-06-01
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
Sample Code 2007-05-22
DatePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the NSDatePicker control.
Sample Code 2007-04-25
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Sample Code 2007-04-25
TrackIt (HTML) (DMG) (ZIP)
Demonstrates how to use the NSTrackingArea class.
Sample Code 2007-03-05
Grady (HTML) (DMG) (ZIP)
Demonstrates how to use the NSGradient class.
Sample Code 2007-02-28
TwoManyControllers (HTML) (DMG) (ZIP)
How to use an intermediate NSArrayController to populate an NSTableView across two to-many relationships.
Sample Code 2007-02-23
Cocoa_With_Carbon_or_CPP (HTML) (DMG) (ZIP)
Shows how to call Carbon routines and C++ code from within an Objective-C Cocoa program.
Sample Code 2007-02-05
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
Sample Code 2007-01-12
MyCustomColorPicker (HTML) (DMG) (ZIP)
Shows how to write a custom color picker using Cocoa.
Sample Code 2006-10-09
ImageBackground (HTML) (DMG) (ZIP)
Shows how to draw an image in the background of an NSOutlineView and NSTableView.
Sample Code 2006-10-02
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Sample Code 2006-08-08
Reducer (HTML) (DMG) (ZIP)
Simple utility for rescaling bitmapped images. Demonstrates use of Core Image, NSAnimation, view drawing redirection.
Sample Code 2005-06-06
iSpend (HTML) (DMG) (ZIP)
Demonstrates how to incorporate a number of Cocoa Tiger features into a simple application.
Sample Code 2005-06-01
TipWrapper (HTML) (DMG) (ZIP)
Shows how to wrap long tool tips into multiple lines in Cocoa.
Sample Code 2003-12-18
OpenGL Screensaver (HTML) (DMG) (ZIP)
Demonstrates how to integrate OpenGL drawing into a standard Cocoa screen saver on Mac OS X.
Sample Code 2003-12-10
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
Sample Code 2003-11-18
FancyAbout (HTML) (DMG) (ZIP)
Demonstrates several visual effects for "About..." panels such as scrolling text, window without a title bar, and ways to dismiss the window.
Sample Code 2003-10-27
Sproing (HTML) (DMG) (ZIP)
Shows how "springs" work to control view resizing behavior.
Sample Code 2003-05-20
FunkyOverlayWindow (HTML) (DMG) (ZIP)
Demonstrates several window layering, transparency and widget interaction techniques in Cocoa.
Sample Code 2003-05-08
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Sample Code 2003-03-26
Clock Control (HTML) (DMG) (ZIP)
Demonstrates creating a custom control by creating a clock control, implemented as a subclass of NSControl and NSCell.
Sample Code 2003-02-25
AnimatedSlider (HTML) (DMG) (ZIP)
Demonstrates the use of an NSTimer to animate a control in Cocoa.
Sample Code 2003-01-14
Color Sampler (HTML) (DMG) (ZIP)
Demonstrates one way to sample the color at a given point in an NSView.
Sample Code 2003-01-14
Cropped Image (HTML) (DMG) (ZIP)
Demonstrates how to extract a sub-image from another image, and some ways of indicating a selection.
Sample Code 2003-01-14
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
Sample Code 2003-01-14
MP3 Player (HTML) (DMG) (ZIP)
How to wrap a command-line UNIX/Linux application in a Cocoa GUI, calling a the command-line app through NSTask.
Sample Code 2003-01-14
RGB Image (HTML) (DMG) (ZIP)
Demonstrates compositing to separate an NSimage into its RGB components, and how to recombine those components.
Sample Code 2003-01-14
RoundTransparentWindow (HTML) (DMG) (ZIP)
Creating (in Cocoa) custom-shaped windows and transparent window content; plus changing the shape of windows dynamically.
Sample Code 2003-01-14
SonOfSillyBalls (HTML) (DMG) (ZIP)
Draws a bunch of randomly colored, randomly placed, silly balls in a window on the screen.
Sample Code 2003-01-14
Tinted Image (HTML) (DMG) (ZIP)
Demonstrates the use of an NSImage as an off-screen drawing destination.
Sample Code 2003-01-14
ToolbarSample (HTML) (DMG) (ZIP)
Demonstrates using the Cocoa NSToolbar/NSToolbarItem API to add customizable toolbars to windows. Includes advanced custom views.
Sample Code 2003-01-14
Querying Metadata With Spotlight (HTML)
TN2192: Describes how a Cocoa application can search Spotlight metadata.
Technical Notes 2007-06-04
Creating an About Panel in Your Cocoa Application (HTML)
TN2179: Describes different ways in implementing your Cocoa application's "About" panel.
Technical Notes 2007-01-22
Using AppleScript Scripts in Cocoa Applications (HTML)
TN2084: Explains how to work with AppleScript scripts in your Cocoa application.
Technical Notes 2006-09-19
Guide to Creating Kiosks on Mac OS X (HTML) (日本語 HTML)
TN2062: Discusses techniques used in creating applications which require kiosk-like functionality on Mac OS X.
Technical Notes 2003-02-24
Requirements for Quartz GL (HTML)
QA1536: Describes the requirements for enabling Quartz GL.
Technical Q&As 2008-08-08
Suppressing the "unexpectedly quit" alert (HTML)
QA1288: Describes how to suppress the "unexpectedly quit" alert.
Technical Q&As 2008-03-11
Disabling text completion in an NSTextField (HTML)
QA1553: Shows how to implement a delegate method provided by NSControl to disable automatic text completion.
Technical Q&As 2008-02-27
NSDate - Natural language date parsing in early Leopard releases (HTML)
QA1581: Acknowledges a regression in +dateWithNaturalLanguageString: behavior of NSDate which is fixed as of 10.5.2.
Technical Q&As 2008-02-27
Re-enabling dragging from NSTableView to other applications (HTML) (日本語 HTML)
QA1220: Explains how to re-enable drag-and-drop from NSTableViews to other applications
Technical Q&As 2008-02-08
Connecting the Font Menu in Interface Builder 3 (HTML)
QA1571: How to connect and configure the Font/Format menus in Interface Builder 3.
Technical Q&As 2008-01-21
Enabling the application menu's "Preferences" menu item on Mac OS X (HTML)
QA1552: Describes the two things you need to implement to enable the "Preferences" menu item on Mac OS X.
Technical Q&As 2008-01-21
Adding and removing a submenu from a menu in Cocoa (HTML)
QA1420: Explains how to dynamically add and remove menus in a Cocoa application.
Technical Q&As 2007-09-10
NSOpenPanel - Choosing any file and ignoring packages (HTML)
QA1468: Explains how to configure NSOpenPanel to filter only files and ignoring packages.
Technical Q&As 2007-01-25
Preventing column reordering in NSTableView (HTML)
QA1503: Demonstrates how to prevent column reordering of certain columns in NSTableView.
Technical Q&As 2007-01-24
Configuring the Recent Searches menu for NSSearchField (HTML)
QA1496: Discusses the common problem when adding menu items to the Recent Searches menu.
Technical Q&As 2006-11-27
NSProgressIndicator animation and redraw (HTML)
QA1473: Discusses why NSProgressIndicator does not redraw during progress loops.
Technical Q&As 2006-11-15
Debugging NSTableView's "Action Invocation" binding (HTML)
QA1472: Discusses the issues and factors that affect NSTableView's "Action Invocation" binding.
Technical Q&As 2006-11-13
How to make NSTextField accept tab, return and enter keys. (HTML)
QA1454: Describes how to make the NSTextField control accept tab, return and enter keys by using the control's dispatch delegate method.
Technical Q&As 2006-10-09
Embedding Hyperlinks in NSTextField and NSTextView (HTML)
QA1487: Shows how a Cocoa app can embed a hyperlink inside both NSTextField and NSTextView using NSAttributedString.
Technical Q&As 2006-10-02
Disabling and Enabling an NSTextView (HTML)
QA1461: Shows how a Cocoa application can disable and enable an NSTextView.
Technical Q&As 2006-09-11
How to create a Cocoa Disclosure Button Control (HTML)
QA1485: Explains how to create a disclosure button control in Cocoa, not immediately available in Interface Builder.
Technical Q&As 2006-08-01
Finding an NSView's current magnification. (HTML)
QA1346: How to discover the current magnification (zoom level) of any NSView.
Technical Q&As 2005-03-08
Why aren't my tracking rects working? (HTML)
QA1355: Describes a common mistake in setting up cursor-tracking rectangles.
Technical Q&As 2004-12-02
How to remove the "Open Recent" menu item in a Document-based Cocoa application (HTML)
QA1289: Explains how to remove the "Open Recent" menu item in a Document-based Cocoa application.
Technical Q&As 2003-09-15
How to set a custom drag image when doing an HFS Promise drag in Cocoa (HTML)
QA1200: Explains how to set a custom drag image when doing an HFS Promise drag in Cocoa.
Technical Q&As 2003-09-15
Preventing crashes when using multiple disabled but editable NSComboBoxes (HTML) (日本語 HTML)
QA1142: How to prevent a crash when using multiple disabled -- but editable --NSComboBoxes in a view.
Technical Q&As 2002-06-03
Solving NSTabView drawing problems in Mac OS X 10.1.x (HTML) (日本語 HTML)
QA1117: Explains how to work around NSTabView draw problems in Mac OS X 10.1.x
Technical Q&As 2002-02-14
Background-only apps with NSStatusItems become active in 10.1 on NSStatusItem clicks (HTML)
QA1081: Preventing background-only apps from activating when their NSStatusItem(s) are clicked in Mac OS X 10.1.
Technical Q&As 2001-10-30
Getting NSWindow's toolbar actions to show up in Interface Builder (HTML)
QA1030: How to add the missing -toggleToolbarShown: and -runToolbarCustomizationPalette actions to Interface Builder.
Technical Q&As 2001-05-03
How to get custom views to show up in NSToolbarItems (HTML)
QA1029: Why custom views may not show up in an NSToolBarItem and how to make it visible.
Technical Q&As 2001-05-03