Jump To:
Leopard Sample Code
Cocoa is an object-oriented application environment designed for developing Mac OS X native applications. The Cocoa frameworks support rapid development and high productivity. Cocoa provides developers starting new Mac OS X projects the fastest way to full-featured implementations. Applications from other platforms can also be brought to Mac OS X quickly using Cocoa.

A guided introduction and learning path for developers new to Cocoa.   Essential information for developers using Objective-C.   Objective-C API references organized by framework.
Document Descriptions
On Off
Display

Sort by
Title
Sort by
Topic
Sorted by
Date
File Wrappers with Core Data Documents (HTML) (DMG) (ZIP)
This sample demonstrates how directory file wrappers can be used with NSPersistentDocument.
Data Management, File Management 2009-04-29
QTCoreVideo202 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL PBO and the Core Video pixel buffer pipeline.
Graphics & Imaging, QuickTime 2009-04-07
QTCoreVideo301 (HTML) (DMG) (ZIP)
Demonstrates adding of effects & filters to QuickTime Movies in realtime using GLSL shaders and the Core Video texture pipeline.
Graphics & Imaging, QuickTime 2009-04-07
PMPrinterTest (HTML) (DMG) (ZIP)
Demonstrates using the PMPrinter APIs to obtain information about the connected printers.
Printing 2009-02-13
SBSystemPrefs (HTML) (DMG) (ZIP)
Shows how to use Scripting Bridge to display a preference pane in System Preferences.
Interapplication Communication, Scripting & Automation 2008-10-13
CALayerEssentials (HTML) (DMG) (ZIP)
Demonstrates the basics of setting up various Core Animation layers
Graphics & Imaging 2008-09-30
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Design Guidelines, Events & Other Input, Graphics & Imaging, Objective-C Language, User Experience 2008-08-29
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
Data Management, Graphics & Imaging, User Experience 2008-07-25
Movie Overlay (HTML) (DMG) (ZIP)
Shows how to overlay text & graphics and perform animation on an QTMovieView through a floating overlay window.
QuickTime 2008-07-25
PortMapper (HTML) (DMG) (ZIP)
Demonstrates Bonjour's NAT port-mapping API, and provides a higher-level Objective-C interface to it.
Networking 2008-07-25
Reminders (HTML) (DMG) (ZIP)
Dashboard widget with a plug-in that displays upcoming iCal events, to do items, and calendars.
Objective-C Language 2008-07-25
QTCoreVideo102 (HTML) (DMG) (ZIP)
An application demonstrating the use of QTKit, CoreVdeo, and OpenGL.
Graphics & Imaging, QuickTime 2008-06-06
QTCoreVideo103 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.
Graphics & Imaging, QuickTime 2008-06-06
QTCoreVideo201 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.
Graphics & Imaging, QuickTime 2008-06-06
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.
File Management, User Experience 2008-06-06
URL CacheInfo (HTML) (DMG) (ZIP)
Demonstrates resource caching behavior using the Cocoa URL loading system.
Networking, Performance 2008-06-05
DerivedProperty (HTML) (DMG) (ZIP)
Illustrates use of Core Data derived properties to make searching against string data more efficient.
Data Management, Performance, Text & Fonts 2008-06-04
Mountains (HTML) (DMG) (ZIP)
Demonstrates localization and internationalization techniques and APIs
Internationalization 2008-06-02
MyMovieFilter (HTML) (DMG) (ZIP)
How to play a movie into a layer-backed QTMovieView and apply a Core Image filter while the movie plays.
QuickTime 2008-06-02
AlbumToSlideshow (HTML) (DMG) (ZIP)
Demonstrates using CF and NSXML to create Final Cut Pro XML.
Objective-C Language 2008-05-15
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
Audio, QuickTime 2008-05-09
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Graphics & Imaging 2008-04-24
QTCoreVideo101 (HTML) (DMG) (ZIP)
Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.
QuickTime 2008-04-24
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
Data Management, User Experience 2008-03-17
NumberInput_IMKit_Sample (HTML) (DMG) (ZIP)
Illustrates an input method that uses the Mac OS X 10.5 InputMethodKit framework.
Events & Other Input, Internationalization 2008-03-17
CarbonCocoaTempConverter (HTML) (DMG) (ZIP)
Demonstrates how to integrate Carbon and Cocoa user interfaces in the same Cocoa application.
Events & Other Input, User Experience 2008-03-10
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Data Management, Events & Other Input, User Experience 2008-03-05
SBSendEmail (HTML) (DMG) (ZIP)
Using the Scripting Bridge to tell Mail.app to send an email message with an optional attachment.
Interapplication Communication, Internet & Web, Scripting & Automation 2008-02-28
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management 2008-02-25
QTCompressionOptionsWindow (HTML) (DMG) (ZIP)
Demonstrates how easy it is to manage QTCompressionOptions instances with a user interface.
QuickTime 2008-02-22
OpenGL Filter Basics Cocoa (HTML) (DMG) (ZIP)
How to use Objective-C and MVC design patterns in installing and utilizing filters in an OpenGL rendering pipeline
Games, Graphics & Imaging 2008-02-06
QTAudioContextInsert (HTML) (DMG) (ZIP)
Demonstrates use of Audio Context Insert APIs to perform custom processing on QuickTime's audio stream.
Audio, QuickTime 2008-01-21
IconCollection (HTML) (DMG) (ZIP)
Demonstrates how to use NSCollectionView along with NSWorkspace and named images to determine its content.
User Experience 2008-01-18
With and Without Bindings (HTML) (DMG) (ZIP)
Illustrates the adoption of Cocoa Bindings and refactoring using a subclass of NSArrayController.
Data Management, Design Guidelines 2008-01-04
DictionaryController (HTML) (DMG) (ZIP)
"DictionaryController" is a Cocoa application that demonstrates various ways in how to use the NSDictionaryController class.
Data Management, User Experience 2007-12-20
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Games, Graphics & Imaging 2007-12-19
ScriptingBridgeiCal (HTML) (DMG) (ZIP)
Adding/updating events in iCal using Scripting Bridge.
Interapplication Communication, Scripting & Automation 2007-12-13
SBSetFinderComment (HTML) (DMG) (ZIP)
Set/Get Finder Comments using Scripting Bridge
Scripting & Automation 2007-12-04
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
File Management, User Experience 2007-11-15
StillMotion (HTML) (DMG) (ZIP)
Demonstrates how to use the QTKit Capture APIs to build a simple application that creates stop motion animations.
QuickTime 2007-11-14
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Games, Graphics & Imaging 2007-11-06
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Games, Graphics & Imaging, User Experience 2007-11-02
Son of Grab (HTML) (DMG) (ZIP)
Shows how to use the new CGWindow to get window images from the Window Server.
Graphics & Imaging 2007-11-01
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
User Experience 2007-10-30
PreLoginAgents (HTML) (DMG) (ZIP)
Pre-login launchd agents to display UI using AppKit and HIToolbox.
Process Management 2007-10-26
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Graphics & Imaging 2007-10-22
QTKitThreadsExporter (HTML) (DMG) (ZIP)
Demonstrates QTKit threading APIs by performing concurrent exports on separate threads.
QuickTime 2007-10-08
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Graphics & Imaging 2007-09-27
Core Animation QuickTime Layer (HTML) (DMG) (ZIP)
Shows the use of controls in a Layer over a Core Animation QTMovieLayer
Graphics & Imaging 2007-09-26
BundleLoader (HTML) (DMG) (ZIP)
Demonstrates how to load multiple Cocoa bundles or NSBundles (also known as plug-ins) into the main NSApplication.
Design Guidelines, Resource Management, Runtime Architecture, User Experience 2007-09-21
QTKitTimeCode (HTML) (DMG) (ZIP)
Demonstrates how to use the QuickTime 32-bit Timecode Media Handler to Add and Remove Timecode Tracks.
QuickTime 2007-09-19
Fiendishthngs (HTML) (DMG) (ZIP)
Fiendishthngs lists all the the Components it finds on the system and lets you query them for information.
QuickTime 2007-09-13
DockTile (HTML) (DMG) (ZIP)
Demonstrates how to customize your application's icon in the Dock by using the NSDockTile class.
User Experience 2007-09-11
QTKitPlayer (HTML) (DMG) (ZIP)
QTKit example code to open, edit, play, import and export QuickTime movies
QuickTime 2007-08-31
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Graphics & Imaging 2007-08-31
SimpleCocoaApp (HTML) (DMG) (ZIP)
A basic Cocoa application for beginners to Cocoa and Objective-C.
Design Guidelines, User Experience 2007-08-07
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Graphics & Imaging 2007-06-21
JavaFrameEmbedding example (HTML) (DMG) (ZIP)
Small Cocoa application that demonstrates how to use JavaFrameEmbedding.framework
Internet & Web, Java, User Experience 2007-06-12
LayerBackedOpenGLView (HTML) (DMG) (ZIP)
"LayerBackedOpenGLView" provides a simple example of hosting Cocoa controls as subviews of an NSOpenGLView.
Graphics & Imaging, User Experience 2007-06-12
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
Graphics & Imaging, User Experience 2007-06-11
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
File Management, User Experience 2007-06-11
MenuItemView (HTML) (DMG) (ZIP)
Demonstrates embedding an NSView inside a menu item or NSMenuItem.
User Experience 2007-06-11
NSOperationSample (HTML) (DMG) (ZIP)
Demonstrates how to use the NSOperation and NSOperationQueue classes.
Process Management 2007-06-11
QuartzComposerSamplePatches (HTML) (DMG) (ZIP)
A short list of new patches in Quartz Composer Mac OS X 10.5
Graphics & Imaging 2007-06-11
ViewController (HTML) (DMG) (ZIP)
Demonstrates how to use "NSViewController".
Printing, Resource Management, User Experience 2007-06-11
Bound Button (HTML) (DMG) (ZIP)
Illustrates using Cocoa bindings to bind a button's target and action parameters.
Data Management 2007-06-08
CustomAtomicStoreSubclass (HTML) (DMG) (ZIP)
Illustrates the implementation of a custom Core Data atomic store.
Data Management 2007-06-08
Simple Bindings Adoption (HTML) (DMG) (ZIP)
A simple example that illustrates the adoption of Cocoa Bindings.
Data Management 2007-06-07
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Accessibility, Design Guidelines, Events & Other Input, User Experience 2007-06-07
JSInterpreter (HTML) (DMG) (ZIP)
Simple JavaScript interpreter
Internet & Web 2007-06-06
JSPong (HTML) (DMG) (ZIP)
Pong with JavaScript AI
Internet & Web 2007-06-06
PredicateEditorSample (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPredicateEditor class.
User Experience 2007-06-06
PrefsPane (HTML) (DMG) (ZIP)
A Cocoa sample System Preferences bundle that demonstrates how to use the NSPreferencePane class.
Data Management, Design Guidelines, User Experience 2007-06-06
SpeedometerView (HTML) (DMG) (ZIP)
Shows how to make a custom NSView.
User Experience 2007-06-06
WebKitPluginStarter (HTML) (DMG) (ZIP)
Shows how to make a minimal WebKit plug-in.
Internet & Web 2007-06-06
WebKitPluginWithJavaScript (HTML) (DMG) (ZIP)
Shows how to call JavaScript from a WebKit plug-in and vice versa.
Internet & Web 2007-06-06
WebKitPluginWithSimpleGUI (HTML) (DMG) (ZIP)
A WebKit plug-in with an Interface Builder GUI
Internet & Web 2007-06-04
Core Data HTML Store (HTML) (DMG) (ZIP)
Implementation of a Core Data atomic store based on HTML tables
Data Management 2007-06-01
NewsReader (HTML) (DMG) (ZIP)
Demonstrates use of the Publication Subscription framework to create a simple RSS reader application.
Data Management, Internet & Web, Networking 2007-06-01
TextLayoutDemo (HTML) (DMG) (ZIP)
Customizing NSTextView with NSLayoutManager and a custom NSTextContainer.
Text & Fonts, User Experience 2007-06-01
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Events & Other Input, Process Management 2007-05-31
Departments and Employees (HTML) (DMG) (ZIP)
Source code for NSPersistentDocument Core Data Tutorial.
Data Management 2007-05-31
AutoSample (HTML) (DMG) (ZIP)
How to run and display Automator workflows in your application.
Scripting & Automation 2007-05-23
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
File Management, User Experience 2007-05-22
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Games, Graphics & Imaging 2007-05-14
LSMSmartCategorizer (HTML) (DMG) (ZIP)
Demonstrates the Latent Semantic Mapping (LSM) framework by automatically categorize RSS feeds.
Data Management, Internet & Web 2007-05-09
DatePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the NSDatePicker control.
User Experience 2007-04-25
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Events & Other Input, User Experience 2007-04-25
QTRecorder (HTML) (DMG) (ZIP)
Shows how to use the new QTKit capture classes introduced in 10.5.
QuickTime 2007-04-10
PictureTaker (HTML) (DMG) (ZIP)
Demonstrates the PictureTaker in a basic Cocoa application
Graphics & Imaging 2007-04-02
ImageBrowser (HTML) (DMG) (ZIP)
Demonstrates the ImageKit's IKImageBrowserView to browse images in a basic Cocoa application.
Graphics & Imaging 2007-03-13
AESendThreadSafe (HTML) (DMG) (ZIP)
Demonstrates how to send Apple events from threads other than the main thread.
Interapplication Communication 2007-03-09
CallJS (HTML) (DMG) (ZIP)
Illustrates how to call JavaScripts on a web page in a WebView from Objective-C and vice versa
Internet & Web 2007-03-09
TrackIt (HTML) (DMG) (ZIP)
Demonstrates how to use the NSTrackingArea class.
User Experience 2007-03-05
Grady (HTML) (DMG) (ZIP)
Demonstrates how to use the NSGradient class.
Graphics & Imaging, User Experience 2007-02-28
TwoManyControllers (HTML) (DMG) (ZIP)
How to use an intermediate NSArrayController to populate an NSTableView across two to-many relationships.
Data Management, Design Guidelines, User Experience 2007-02-23
UIElementInspector (HTML) (DMG) (ZIP)
Demonstrates using the Accessibility API introduced in Mac OS X 10.2, which allows manipulation of an application's UI.
Accessibility 2007-02-19
Cocoa_With_Carbon_or_CPP (HTML) (DMG) (ZIP)
Shows how to call Carbon routines and C++ code from within an Objective-C Cocoa program.
Design Guidelines, Objective-C Language, User Experience 2007-02-05
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
User Experience 2007-01-12
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Accessibility, Events & Other Input 2006-11-28