Jump To:
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

Sorted by
Title
Sort by
Topic
Sort by
Date
ImagesToQTMovie (HTML) (DMG) (ZIP)
Creates a QuickTime movie from the images of any connected camera.
QuickTime 2003-01-14
InkSample (HTML) (DMG) (ZIP)
Demonstrates some usage scenarios for the Ink.Framework APIs.
Text & Fonts 2003-10-27
iSpend (HTML) (DMG) (ZIP)
Demonstrates how to incorporate a number of Cocoa Tiger features into a simple application.
Data Management, User Experience 2005-06-01
JavaFrameEmbedding example (HTML) (DMG) (ZIP)
Small Cocoa application that demonstrates how to use JavaFrameEmbedding.framework
Internet & Web, Java, User Experience 2007-06-12
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Data Management, Events & Other Input, File Management, Java, Resource Management, Tools 2003-01-14
JOutlineView (HTML) (DMG) (ZIP)
Exhibiting the use of NSOutlineView in Cocoa-Java in a simple program.
Java 2003-01-14
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
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
LayoutManagerDemo (HTML) (DMG) (ZIP)
Demonstrates the layout manager using rollovers with different colors for lines, words and characters under the mouse.
Text & Fonts 2003-01-14
Link Snoop (HTML) (DMG) (ZIP)
Shows how to use PDFKit to scan for and highlight link annotations in PDFs.
Graphics & Imaging 2005-06-01
LiveVideoMixer3 (HTML) (DMG) (ZIP)
LiveVideoMixer3 is extended to support Video In via QTKit
Graphics & Imaging, QuickTime 2006-08-01
LoginItemsAE (HTML) (DMG) (ZIP)
Uses Apple events to manipulate the list of login items (items launched when you log in).
Process Management 2005-10-17
LSMSmartCategorizer (HTML) (DMG) (ZIP)
Demonstrates the Latent Semantic Mapping (LSM) framework by automatically categorize RSS feeds.
Data Management, Internet & Web 2007-05-09
ManagedObjectDataFormatter (HTML) (DMG) (ZIP)
A Data Formatter for Xcode 2.0 and 2.1 that displays NSManagedObject * variables.
Data Management 2005-06-01
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Resource Management 2003-11-19
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Graphics & Imaging 2007-09-27
MenuItemView (HTML) (DMG) (ZIP)
Demonstrates embedding an NSView inside a menu item or NSMenuItem.
User Experience 2007-06-11
MethodReplacement (HTML) (DMG) (ZIP)
Demonstrates an Objective C 2 compatible way to replace a method in an existing Objective C class.
Objective-C Language 2006-08-01
MigrationV2 (HTML) (DMG) (ZIP)
Demonstrates using a migration mapping and policy to migrate from one store model version to another.
Data Management 2006-08-01
Monochrome Image (HTML) (DMG) (ZIP)
Applies the NTSC color weighting formula to an image to generate a monochrome version of the image.
Graphics & Imaging 2003-07-16
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
File Management 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
File Management 2005-05-13
Moriarity (HTML) (DMG) (ZIP)
Implementing a Cocoa GUI that wraps command-line functionality, calling a UNIX task and presenting the results in a GUI.
Interapplication Communication, Porting 2003-01-14
Mountains (HTML) (DMG) (ZIP)
Demonstrates localization and internationalization techniques and APIs
Internationalization 2008-06-02
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
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.
Audio, Interapplication Communication, User Experience 2003-01-14
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
User Experience 2003-11-18
MyCustomColorPicker (HTML) (DMG) (ZIP)
Shows how to write a custom color picker using Cocoa.
Graphics & Imaging, User Experience 2006-10-09
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
NameAndAddress (HTML) (DMG) (ZIP)
A single window utility that gets a host name from an IP address or an IP address from a hostname.
Apple Applications, Networking 2003-01-14
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Text & Fonts 2003-01-14
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
NSFontAttributeExplorer (HTML) (DMG) (ZIP)
Demonstrates how to gather and display various metric information for installed fonts using NSFont.
Text & Fonts 2006-10-26
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Games, Graphics & Imaging 2004-12-01
NSOpenGL Fullscreen (HTML) (DMG) (ZIP)
Demonstrates how to create and switch between windowed and fullscreen OpenGL contexts using NSOpenGL.
Graphics & Imaging 2004-02-11
NSOperationSample (HTML) (DMG) (ZIP)
Demonstrates how to use the NSOperation and NSOperationQueue classes.
Process Management 2007-06-11
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
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
File Management, User Experience 2007-05-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
OpenGL Screensaver (HTML) (DMG) (ZIP)
Demonstrates how to integrate OpenGL drawing into a standard Cocoa screen saver on Mac OS X.
Graphics & Imaging, User Experience 2003-12-10
OpenGLCompositorLab (HTML) (DMG) (ZIP)
Demonstrates using OpenGL to composite multiple sources in hardware. Requires NVIDIA GeForce 4 Ti hardware.
Graphics & Imaging, QuickTime 2003-04-21
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Interapplication Communication, Text & Fonts 2005-08-10
PDF Annotation Editor (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to examine, edit, and create PDF annotations.
Graphics & Imaging 2006-07-31
PDF Calendar (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to create PDF content.
Graphics & Imaging 2006-07-31
PDFKitLinker2 (HTML) (DMG) (ZIP)
Demonstrates many aspects of PDFKit including navigation, display modes, searching, and PDFView subclassing.
Graphics & Imaging 2005-08-10
PDFView (HTML) (DMG) (ZIP)
Shows how to display or print a multi-page PDF document and scroll an NSscrollview's contents by dragging.
Graphics & Imaging 2003-01-23
People (HTML) (DMG) (ZIP)
This program demonstrates the use of the SyncServices framework.
Data Management, Syncing 2005-06-01
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
PictureSharing (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to advertise a service using Bonjour.
Networking 2005-02-08
PictureSharingBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to take advantage of Bonjour service discovery and name resolution.
Networking 2005-02-08
PictureTaker (HTML) (DMG) (ZIP)
Demonstrates the PictureTaker in a basic Cocoa application
Graphics & Imaging 2007-04-02
PMPrinterTest (HTML) (DMG) (ZIP)
Get specific printer information for your application using the PMPrinter APIs
Printing 2004-11-05
Polygons (HTML) (DMG) (ZIP)
Demonstrates the NSBezierPath class, as well as the manipulation of NSView's coordinate space for convenience.
Graphics & Imaging 2003-01-14
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
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
PreLoginAgents (HTML) (DMG) (ZIP)
Pre-login launchd agents to display UI using AppKit and HIToolbox.
Process Management 2007-10-26
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Graphics & Imaging 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Graphics & Imaging 2006-08-07
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
QTAudioExtractionPanel (HTML) (DMG) (ZIP)
Enhances the QTKitPlayer to add an Audio Channel Mapping and Extraction panel
QuickTime 2005-06-27
QTCompressionOptionsWindow (HTML) (DMG) (ZIP)
Demonstrates how easy it is to manage QTCompressionOptions instances with a user interface.
QuickTime 2008-02-22
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
Graphics & Imaging, QuickTime 2005-07-19
QTCoreVideo101 (HTML) (DMG) (ZIP)
Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.
QuickTime 2008-04-24
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
QTCoreVideo202 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL PBO and the Core Video pixel buffer pipeline.
Graphics & Imaging, QuickTime 2008-06-06
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 2008-06-06
QTEffectsDialog - Cocoa (HTML) (DMG) (ZIP)
Shows how to display the standard QuickTime effects parameters dialog in a Cocoa application.
QuickTime 2003-09-04
QTExtractAndConvertToAIFF (HTML) (DMG) (ZIP)
Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a AIFF file.
QuickTime 2006-11-08
QTExtractAndConvertToMovieFile (HTML) (DMG) (ZIP)
Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a QuickTime movie file.
QuickTime 2006-11-08
QTGraphicsImport (HTML) (DMG) (ZIP)
Demonstrates how to use the QuickTime Graphics Importer to draw an image into a NSWindow using a NSQuickDrawView.
QuickTime 2003-01-14
QTKitButtonTester (HTML) (DMG) (ZIP)
Shows how to use the QTMovieView methods for hiding and showing the buttons in the movie controller bar.
QuickTime 2006-08-01
QTKitMovieShuffler (HTML) (DMG) (ZIP)
Demonstrates a simple QTKit movie player application.
QuickTime 2006-01-03
QTKitPlayer (HTML) (DMG) (ZIP)
QTKit example code to open, edit, play, import and export QuickTime movies
QuickTime 2007-08-31
QTKitThreadedExport (HTML) (DMG) (ZIP)
Shows how to export a QTMovie on a background thread.
QuickTime 2006-08-01
QTKitThreadsExporter (HTML) (DMG) (ZIP)
Demonstrates QTKit threading APIs by performing concurrent exports on separate threads.
QuickTime 2007-10-08
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
QTNoStepsDemo (HTML) (DMG) (ZIP)
Shows how to subclass QTMovieView to override its default behaviors.
QuickTime 2006-08-01
QTQuartzPlayer (HTML) (DMG) (ZIP)
QTQuartzPlayer demonstrates how to render QuickTime Movies and live video with OpenGL and CoreVideo.
QuickTime 2005-10-04
QTRecorder (HTML) (DMG) (ZIP)
Shows how to use the new QTKit capture classes introduced in 10.5.
QuickTime 2007-04-10
QTtoCG (HTML) (DMG) (ZIP)
Shows how to create a CGImageRef with the proper ColorSync profile from a QuickTime image on disk.
Graphics & Imaging, QuickTime 2003-01-14
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Graphics & Imaging 2007-08-31
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Graphics & Imaging 2007-06-21
Quartz Composer Live DV (HTML) (DMG) (ZIP)
Shows how to export a Quartz Composer composition as a real-time DV stream on the FireWire port.
Graphics & Imaging 2005-06-01
Quartz Composer Matrix (HTML) (DMG) (ZIP)
Shows how to use Quartz Composer to display a QuickTime movie as a series of frames in a 3D world.
Graphics & Imaging 2005-06-01
Quartz Composer Offline Rendering (HTML) (DMG) (ZIP)
Shows how to render a Quartz Composer composition as a series of images using an OpenGL pBuffer.
Graphics & Imaging 2005-06-01
Quartz Composer QCTV (HTML) (DMG) (ZIP)
Shows how to build a fake TV system using Quartz Composer as the foundation motion graphics.
Graphics & Imaging 2005-07-06
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 TextEdit (HTML) (DMG) (ZIP)
Demonstrate how to modify TextEdit's about dialog to display a Quartz Composer composition.
Graphics & Imaging 2005-06-01
Quartz EB (HTML) (DMG) (ZIP)
WWDC 2001 Early Bird Quartz 2D tutorial of vector drawing and PDF import/export.
Graphics & Imaging 2003-01-14
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Graphics & Imaging 2006-09-11
QuartzComposerSamplePatches (HTML) (DMG) (ZIP)
A short list of new patches in Quartz Composer Mac OS X 10.5
Graphics & Imaging 2007-06-11
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Graphics & Imaging 2005-06-01
Reducer (HTML) (DMG) (ZIP)
Simple utility for rescaling bitmapped images. Demonstrates use of Core Image, NSAnimation, view drawing redirection.
Graphics & Imaging, User Experience 2005-06-06
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
RGB Image (HTML) (DMG) (ZIP)
Demonstrates compositing to separate an NSimage into its RGB components, and how to recombine those components.
Events & Other Input, Graphics & Imaging, User Experience 2003-01-14