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

Sorted by
Title
Sort by
Topic
Sort by
Date
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Apple Applications, Interapplication Communication 2006-08-04
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
Data Management, User Experience 2008-03-17
AddressBookCocoa (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the Mac OS X 10.2.x (and beyond) Address Book API.
Interapplication Communication 2003-01-14
AESendThreadSafe (HTML) (DMG) (ZIP)
Demonstrates how to send Apple events from threads other than the main thread.
Interapplication Communication 2007-03-09
AlbumToSlideshow (HTML) (DMG) (ZIP)
Demonstrates using CF and NSXML to create Final Cut Pro XML.
Objective-C Language 2008-05-15
AnimatedSlider (HTML) (DMG) (ZIP)
Demonstrates the use of an NSTimer to animate a control in Cocoa.
User Experience 2003-01-14
AttachAScript (HTML) (DMG) (ZIP)
Illustrates how you can extend any Cocoa application by adding some AppleScripts to it.
Interapplication Communication 2006-07-27
AudioBurn (HTML) (DMG) (ZIP)
Demonstrates how to create an object conforming to the DRTrackProduction protocol to create a RedBook audio CD.
File Management 2005-03-17
AudioDeviceNotify (HTML) (DMG) (ZIP)
Demonstrates how to enumerate audio devices attached to the system and how to handle device notifications
Audio 2006-04-21
AutoSample (HTML) (DMG) (ZIP)
How to run and display Automator workflows in your application.
Scripting & Automation 2007-05-23
AutoUpdater (HTML) (DMG) (ZIP)
This sample demonstrates Cocoa networking using the NSURL loading classes, NSURLConnection and NSURLDownload.
Networking 2005-06-01
BackgroundExporter (HTML) (DMG) (ZIP)
Demonstrates techniques which can be used to export QuickTime movies in a separate export process.
QuickTime 2005-07-22
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
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Data Management, Design Guidelines, Events & Other Input 2005-06-01
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Games, Graphics & Imaging 2007-11-06
Bound Button (HTML) (DMG) (ZIP)
Illustrates using Cocoa bindings to bind a button's target and action parameters.
Data Management 2007-06-08
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
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
User Experience 2007-10-30
CALayerEssentials (HTML) (DMG) (ZIP)
Demonstrates the basics of setting up various Core Animation layers
Graphics & Imaging 2008-09-30
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
CallMachOFramework (HTML) (DMG) (ZIP)
Shows two ways of calling a Mach-O framework from a CFM application on Mac OS X.
Runtime Architecture 2003-07-17
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
User Experience 2007-01-12
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Graphics & Imaging, Internet & Web 2006-07-25
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
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Events & Other Input, User Experience 2003-03-26
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Graphics & Imaging, Porting 2006-10-02
CFM_MachO_CFM (HTML) (DMG) (ZIP)
CFM application calls Mach-O routine, passing in a fixed up CFM function pointer as a callback parameter.
Runtime Architecture 2003-07-17
CGDrawPicture (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the QDPictDrawToCGContext API.
Graphics & Imaging 2003-01-14
CheckExecutableArchitecture (HTML) (DMG) (ZIP)
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Runtime Architecture 2006-02-07
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Graphics & Imaging 2005-08-01
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
Clock Control (HTML) (DMG) (ZIP)
Demonstrates creating a custom control by creating a clock control, implemented as a subclass of NSControl and NSCell.
User Experience 2003-02-25
Cocoa - SGDataProc (HTML) (DMG) (ZIP)
Uses a Sequence Grabber data function and an NSQuickDrawView to simulate a preview operation for captured video.
QuickTime 2003-01-14
Cocoa CG aliasing demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased text and graphics using Quartz and Cocoa.
Graphics & Imaging 2003-07-17
Cocoa CG arc demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased arcs using Quartz and Cocoa.
Graphics & Imaging 2003-07-17
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Graphics & Imaging 2007-10-22
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
CocoaDragAndDrop (HTML) (DMG) (ZIP)
Implement Drag-and-Drop functionality in Cocoa (uses images; can be extended to support other data types).
Events & Other Input, Interapplication Communication 2003-01-14
CocoaEcho (HTML) (DMG) (ZIP)
Cocoa example code showing how to write a simple client and server using NSStream.
Networking 2005-06-01
CocoaHTTPServer (HTML) (DMG) (ZIP)
A Cocoa example showing how to write a very basic HTTP service.
Networking 2005-06-01
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Runtime Architecture 2005-10-04
CocoaPeoplePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the AddressBook framework's ABPeoplePickerView.
Apple Applications 2003-12-11
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
CocoaSOAP (HTML) (DMG) (ZIP)
Demonstrates implementing a SOAP client and server in Cocoa.
Networking 2005-06-06
CocoaVideoFrameToGWorld (HTML) (DMG) (ZIP)
Demonstrates how to draw each frame of a QuickTime movie into a Cocoa NSQuickDrawView.
QuickTime 2003-01-14
CocoaVideoFrameToNSImage (HTML) (DMG) (ZIP)
Demonstrates how to create an NSImage for each frame of a QuickTime movie.
QuickTime 2003-01-14
Color Sampler (HTML) (DMG) (ZIP)
Demonstrates one way to sample the color at a given point in an NSView.
Events & Other Input, Graphics & Imaging, User Experience 2003-01-14
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Graphics & Imaging 2003-01-14
ColorMatching (HTML) (DMG) (ZIP)
Performs simple color matching of images using ColorSync or the QuickTime 6.4 Graphics Importers.
Graphics & Imaging 2003-12-18
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Events & Other Input, Graphics & Imaging 2003-01-14
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
File Management 2003-10-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
Core Data HTML Store (HTML) (DMG) (ZIP)
Implementation of a Core Data atomic store based on HTML tables
Data Management 2007-06-01
CoreRecipes (HTML) (DMG) (ZIP)
Demonstrates the use of Core Data (persistency and object-graph management) with a variety of application projects.
Data Management 2005-06-01
Cropped Image (HTML) (DMG) (ZIP)
Demonstrates how to extract a sub-image from another image, and some ways of indicating a selection.
Graphics & Imaging, User Experience 2003-01-14
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Events & Other Input, Process Management 2007-05-31
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Security 2003-02-06
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Graphics & Imaging 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Graphics & Imaging 2003-01-14
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Games, Graphics & Imaging 2003-04-21
CustomAtomicStoreSubclass (HTML) (DMG) (ZIP)
Illustrates the implementation of a custom Core Data atomic store.
Data Management 2007-06-08
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
File Management, User Experience 2007-06-11
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
File Management 2005-03-17
DatePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the NSDatePicker control.
User Experience 2007-04-25
Departments and Employees (HTML) (DMG) (ZIP)
Source code for NSPersistentDocument Core Data Tutorial.
Data Management 2007-05-31
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
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
File Management, User Experience 2003-01-14
DeviceListener (HTML) (DMG) (ZIP)
Uses the DiscRecording framework to listen for device plug/unplug events and media insertion events.
File Management 2003-07-17
Dicey (HTML) (DMG) (ZIP)
Dicey is a dice game project that demonstrates various techniques for making a Cocoa application accessible.
Accessibility, Events & Other Input 2006-08-01
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
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
DragItemAround (HTML) (DMG) (ZIP)
Illustrates creating a custom subclass of NSView.
Graphics & Imaging 2006-03-16
DynamicProperties (HTML) (DMG) (ZIP)
Demonstrates dynamically resolved properties, using a new Objective C 2.0 feature: dynamically resolved methods.
Objective-C Language 2006-08-01
EnhancedAudioBurn (HTML) (DMG) (ZIP)
This Objective-C sample demonstrates how to burn RedBook Audio CDs.
File Management 2005-07-06
EnhancedDataBurn (HTML) (DMG) (ZIP)
Objective-C sample which shows how to burn a data disc containing a complete virtual filesystem.
File Management 2003-01-14
Eraser (HTML) (DMG) (ZIP)
Uses the DiscRecordingUI framework to present the standard erase, selection and progress dialogs.
File Management 2003-01-14
ExtractMovieAudioToAIFF (HTML) (DMG) (ZIP)
Demonstrates how to extract audio from QuickTime Movies and write the data to an AIFF file.
Audio, QuickTime 2006-03-31
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.
Graphics & Imaging, User Experience 2003-10-27
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
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
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management 2006-01-10
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management 2004-03-19
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management 2008-02-25
FunkyOverlayWindow (HTML) (DMG) (ZIP)
Demonstrates several window layering, transparency and widget interaction techniques in Cocoa.
Events & Other Input, Graphics & Imaging, User Experience 2003-05-08
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
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Networking, Security 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Networking, Security 2005-10-27
GLChildWindowDemo (HTML) (DMG) (ZIP)
Shows using Cocoa's child windows and Quartz Extreme to provide 2D/3D overlays above 3D content.
Graphics & Imaging 2003-04-21
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Games, Graphics & Imaging 2006-07-17
Grady (HTML) (DMG) (ZIP)
Demonstrates how to use the NSGradient class.
Graphics & Imaging, User Experience 2007-02-28
GridCalendar (HTML) (DMG) (ZIP)
Demonstrates how to add a custom job submission UI to the GridSample project.
Networking 2005-06-01
IconCollection (HTML) (DMG) (ZIP)
Demonstrates how to use NSCollectionView along with NSWorkspace and named images to determine its content.
User Experience 2008-01-18
Image Difference (HTML) (DMG) (ZIP)
Demonstrates a way to use Quartz's compositing capability to find the difference between two images.
Graphics & Imaging 2003-01-30
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
ImageBackground (HTML) (DMG) (ZIP)
Shows how to draw an image in the background of an NSOutlineView and NSTableView.
Graphics & Imaging, User Experience 2006-10-02
ImageBrowser (HTML) (DMG) (ZIP)
Demonstrates the ImageKit's IKImageBrowserView to browse images in a basic Cocoa application.
Graphics & Imaging 2007-03-13
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Networking 2005-06-01
ImageMapExample (HTML) (DMG) (ZIP)
Implements a custom NSView, an image map, and accessorizes it (i.e. makes it work with accessibility).
Accessibility 2005-06-01
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
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
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
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Games 2005-06-01
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)
Demonstrates using the PMPrinter APIs to obtain information about the connected printers.
Printing 2009-02-13
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 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
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
RGB ValueTransformers (HTML) (DMG) (ZIP)
Supersedes the "RGB Image sample". Sample now uses bindings. Color separation now done in an NSValueTransformer subclass.
Graphics & Imaging 2003-11-18
RoundTransparentWindow (HTML) (DMG) (ZIP)
Creating (in Cocoa) custom-shaped windows and transparent window content; plus changing the shape of windows dynamically.
Graphics & Imaging, User Experience 2003-01-14
SayIt (HTML) (DMG) (ZIP)
Web Kit plug-in which speaks text passed via JavaScript
Internet & Web 2006-08-04
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
SBSetFinderComment (HTML) (DMG) (ZIP)
Set/Get Finder Comments using Scripting Bridge
Scripting & Automation 2007-12-04
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
ScriptingBridgeiCal (HTML) (DMG) (ZIP)
Adding/updating events in iCal using Scripting Bridge.
Interapplication Communication, Scripting & Automation 2007-12-13
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Events & Other Input, User Experience 2007-04-25
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Accessibility, Events & Other Input 2006-11-28
SharedMemory (HTML) (DMG) (ZIP)
Shows how multiple applications can access the same memory using the Unix shmget system call.
Performance, Process Management 2003-01-14
SillyFrequencyLevels (HTML) (DMG) (ZIP)
Demonstrates how to obtain audio frequency levels from a Movie using SetMovieAudioFrequencyMeteringNumBands and GetMovieAudioFrequencyLevels APIs.
QuickTime 2006-01-25
Simon (HTML) (DMG) (ZIP)
A simple game demonstrating Cocoa development in Project Builder.
Tools 2003-01-14
Simple Bindings Adoption (HTML) (DMG) (ZIP)
A simple example that illustrates the adoption of Cocoa Bindings.
Data Management 2007-06-07
SimpleCalendar (HTML) (DMG) (ZIP)
Uses the Calendar Store framework to fetch iCal events and display them on a custom calendar.
Apple Applications 2006-07-27
SimpleCocoaApp (HTML) (DMG) (ZIP)
A basic Cocoa application for beginners to Cocoa and Objective-C.
Design Guidelines, User Experience 2007-08-07
SimpleCocoaJavaMovie (HTML) (DMG) (ZIP)
Deprecated - A simple movie player showing how to use the NSMovieView and NSMovie Cocoa Java classes.
Java, QuickTime 2003-01-14
SimpleCocoaJavaMovieCocoa (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the NSMovieView and NSMovie Cocoa Java AppKit classes.
Graphics & Imaging 2003-01-14
SimpleCocoaMovie (HTML) (DMG) (ZIP)
Shows how to use the NSMovieView and NSMovie Cocoa AppKit classes.
QuickTime 2003-01-14
SimpleCocoaMovieQT (HTML) (DMG) (ZIP)
A simple movie player showing how to use the NSMovieView and NSMovie Cocoa Objective-C classes.
QuickTime 2003-01-14
SimpleThreads (HTML) (DMG) (ZIP)
Uses the Cocoa threading APIs to coordinate multiple preemptively scheduled secondary threads with the non-reentrant Cocoa framework.
Interapplication Communication, Performance, Process Management, Runtime Architecture 2003-01-14
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
SonOfSillyBalls (HTML) (DMG) (ZIP)
Draws a bunch of randomly colored, randomly placed, silly balls in a window on the screen.
Events & Other Input, Graphics & Imaging, Runtime Architecture, User Experience 2003-01-14
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
File Management, User Experience 2007-11-15
SpecialPictureProtocol (HTML) (DMG) (ZIP)
Use a custom NSURLProtocol to create jpeg images in memory for display in a webView.
Internet & Web 2006-03-13
SpeedometerView (HTML) (DMG) (ZIP)
Shows how to make a custom NSView.
User Experience 2007-06-06
SpellingChecker CarbonCocoa Bundled (HTML) (DMG) (ZIP)
How to load and call a Cocoa bundle from a Carbon CFM or Mach-O application
Runtime Architecture 2004-08-17
SpellingChecker-CarbonCocoa (HTML) (DMG) (ZIP)
Implements procedural C wrapper around the Cocoa NSSpellChecker, exports it as a Mach-O bundle called "SpellCheck.bundle"
Runtime Architecture 2003-01-14
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Runtime Architecture 2005-08-10
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
Sproing (HTML) (DMG) (ZIP)
Shows how "springs" work to control view resizing behavior.
User Experience 2003-05-20
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
SSLSample (HTML) (DMG) (ZIP)
Contains examples showing how to use SecureTransport.
Security 2003-01-14
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Apple Applications, Syncing, User Experience 2006-08-08
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
TextLayoutDemo (HTML) (DMG) (ZIP)
Customizing NSTextView with NSLayoutManager and a custom NSTextContainer.
Text & Fonts, User Experience 2007-06-01
TextLinks (HTML) (DMG) (ZIP)
Programmatically creates links to URLs and other objects and handles clicks in non-URL links.
Networking 2003-07-29
TexturePerformanceDemo (HTML) (DMG) (ZIP)
OpenGL texture optimization demo for WWDC Session 214
Graphics & Imaging 2005-06-01
TextViewConfig (HTML) (DMG) (ZIP)
Configuration of multiple layout managers and multiple text container/text view pairs on a single text storage.
Text & Fonts 2003-01-14
TextViewDelegate (HTML) (DMG) (ZIP)
Demonstrates using a text view's delegate to control selection and user input.
Text & Fonts 2003-01-14
ThreadsExporter (HTML) (DMG) (ZIP)
Demonstrates importing and exporting still images in different formats on separate threads.
QuickTime 2005-07-26
ThreadsExportMovie (HTML) (DMG) (ZIP)
Demonstrates movie exporting using the QuickTime movie export component on separate threads of a Cocoa application.
QuickTime 2006-01-03
Tinted Image (HTML) (DMG) (ZIP)
Demonstrates the use of an NSImage as an off-screen drawing destination.
Graphics & Imaging, User Experience 2003-01-14
TipWrapper (HTML) (DMG) (ZIP)
Shows how to wrap long tool tips into multiple lines in Cocoa.
Text & Fonts, User Experience 2003-12-18
ToolbarSample (HTML) (DMG) (ZIP)
Demonstrates using the Cocoa NSToolbar/NSToolbarItem API to add customizable toolbars to windows. Includes advanced custom views.
Events & Other Input, User Experience 2003-01-14
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
TrackFormatDemo (HTML) (DMG) (ZIP)
Shows how to get a human-readable, localized description of a track's format.
QuickTime 2006-08-01
TrackIt (HTML) (DMG) (ZIP)
Demonstrates how to use the NSTrackingArea class.
User Experience 2007-03-05
Transformed Image (HTML) (DMG) (ZIP)
Shows the effects of a rendering an NSImage in a transformed coordinate space.
Graphics & Imaging 2003-01-14
TremoloUnit (HTML) (DMG) (ZIP)
Audio unit sample demonstrating how to build an effect unit with a generic view.
Audio 2006-10-26
TrivialThreads (HTML) (DMG) (ZIP)
Uses the Cocoa threading APIs to coordinate a preemptively scheduled secondary thread with the non-reentrant Cocoa framework.
Interapplication Communication, Performance, Process Management, Runtime Architecture 2003-01-14
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
UnsharpMask (HTML) (DMG) (ZIP)
Demonstrates how to build Automator actions using Cocoa frameworks.
Apple Applications, Graphics & Imaging 2005-06-06
URL CacheInfo (HTML) (DMG) (ZIP)
Demonstrates resource caching behavior using the Cocoa URL loading system.
Networking, Performance 2008-06-05
VBL (HTML) (DMG) (ZIP)
A simple example of how to create an OpenGLView in AppKit.
Graphics & Imaging 2003-07-07
Verification (HTML) (DMG) (ZIP)
Objective-C example which demonstrates how to provide custom data verification for data written to disc.
File Management 2004-01-23
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Games, Graphics & Imaging 2005-06-01
Video Hardware Info (HTML) (DMG) (ZIP)
Sample demonstrates how to query the video hardware for useful information.
Graphics & Imaging 2004-02-12
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Games, Graphics & Imaging 2007-05-14
VideoViewer (HTML) (DMG) (ZIP)
Simple example of video rendering using QuickTime visual contexts, OpenGL, Core Video and Core Image.
Graphics & Imaging, QuickTime 2005-08-01
ViewController (HTML) (DMG) (ZIP)
Demonstrates how to use "NSViewController".
Printing, Resource Management, User Experience 2007-06-11
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management 2006-08-04
WebKitDOMElementPlugIn (HTML) (DMG) (ZIP)
A Web Kit plug-in that modifies its own DOM element style
Internet & Web 2006-08-04
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
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
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
Worm (HTML) (DMG) (ZIP)
NSView performance demonstration. Uses a periodic timer to get best performance with Coalesced Update feature.
Graphics & Imaging, Performance 2005-06-01
WritableFileDemo (HTML) (DMG) (ZIP)
Shows how to create an empty, writable file associated with a QTMovie object.
QuickTime 2006-08-01