Please add more! See also TipsAndTricks for snippets of useful information.
See also ObjectLibrary, CocoaDevUsersAdditions.
-
Usable code (not example code)
- CocoaSpriteKit
- CompareNumerically two strings
- FoundationCollectionsPalette (subclassing IBInspector)
- KTLLMutableArray (subclassing NSMutableArray; implementing DesignDoublyXORLinkedList)
- MethodSwizzling
- BSTrampoline (HigherOrderMessaging for collections)
- LSTrampoline (alternative implementation for HOM; not restricted to use with collections)
- IconaraDOM (Document Object Model framework for working with XML-data in ObjectiveC)
- MultiProcessorWorkSharing (Taking advantage of multiprocessor systems for coarse- and fine-grained parallelism)
- NotificationOnNewNetwork (SystemConfiguration notification handler)
- FTSWAbstractSingleton - base class that allows the quick implementation of singleton objects, just sub-class
- PredicateSorting - An example application to sort tables columns based on predicates.
-
AUUIDClass - A simple UUID class.
-
User Interface Issues, i.e. AppKit
- AlternatingRowColors in NSTableView/NSOutlineView
- ButtonsInTableOrOutlineViews
- CheckingForUpdatesToYourApp
- ClickableUrlInTextView
- CocoaSpreadSheetHelp (link to download)
- CopyAndPaste
- DirectoryOpenPanel
- DisplayingSheets
- DockImageExample
- DragAndDropTableView
- ExtendibleWindow
- FlowLayoutView
- FocusRingAroundTableView
- HowToCreateWalkingAnts and selection rectangles
- HtmlDisplayFramework
- HtmlSourceView (with colors)
- LineNumbers
- MakingAppServices
- MakingServices
- MonacoInItalic
- NSOpenPanel
- NSOpenPanelWithFileTypes
- NSTextFieldSampleCode
- NSToolbarItemSampleCode
- OReillyAddressBookTableExample - includes discussion of adapting for use with CocoaBindings
- ParsingHtmlInTextView
- ReplaceSaveChangesSheet
- SampleTableCode
- SavingNSSplitViewPosition
- SearchTextFieldCell
- SendingAppleEventsToSystemProfiler
- SendingEmailMessages with NSWorkspace
- ShowAlertAndWriteToLog
- SortingTableViewByColumn
- ToolTip
- TrackingAMovingWindow – keeping track of a dragged around window’s frame rect
- TrackingSlider
- UFISpringyPanel — window that resizes to fit changing content size
-
WindowShade
-
Graphics, Games, Multimedia
- AnimationTechniquesAndCocoa
- EnhancingBuiltInImageImport
- GameKeyboardHandlingAlmost
- HitDetection
- ImageTransparencyFiltering
- MakingFractalsUsingBitmapImageRep
- MovieViewAudioPlaybackWithBugWorkaround
- RoundedRectangles
- SampleScreenSaverViews
- SimpleAnimationExamples (e.g. using NSTimer)
- SimplisticColourCoding
- SmoothImageView
*Objective-C and OOP Concepts
- AccessorMethods
- CategorySampleCode
- SingletonDesignPattern
- RetainReleaseTips
- WorkingWithSelectors
- UsingArchiversAndUnarchivers
-
InstanceCounting - MethodSwizzling and debugging
-
Foundation Framework Fun
- AccessingResources within a bundle
- DistributedObjectsSampleCode
- HowToSave
- IteratingThroughAnArray
- NibFilesInsideBundles
- NotificationsAcrossThreads
- NotificationSampleCode
- ThreadWorker for easier multi-threading
- WorkingWithUserDefaults
- LoadingDocumentsAtStartup
- use SortUsingSelector and friends to customize NSArray’s sorting behavior
-
ListOfConnectediPods
-
Internet / Networking
- ComputersOnNetwork
- DownloadingFiles
- HtmlDisplayFramework
- OmniNetworking
- OpeningUrlFromJava
- ParsingHtmlInTextView
- SendingEmailMessages with NSWorkspace
- SendingEmail the Message Framework
- SmallSocketsOnConnection
- SOAP AppleScriptCocoaSample
-
NSStream
-
AppleScript Support
-
HowToSupportAppleScript
-
As-Yet Uncategorized
- SetADateForAnAppToExpire - useful for making time-limited betas: pick a target date and when that date is reached terminate the app on awakeFromNIB
- GlobalModifications
- StackTraces
- OmniExpatExample
-
VariableLengthArgumentLists
- http://osx.hyperjeff.net/Apps/index.php has Cocoa Applications with source code
- http://www.scotlandsoftware.com/products/source/ has various Cocoa apps and system services with source
- NIRTimer - for easy timing of code
- TimingWithDeferredLogging - Easy timing of code using macros
- MoreClocks: A full version of the popular Clocks utility use in MacOS 10.1 & 10.2 => [http://regnault.luc.free.fr/openSource.html]
- DetectQuartzExtreme - A snippet showing how to determine if an NSScreen is running Quartz Extreme.
- BookMacOSXADT - Go to http://www.triplesoft.com/macosx/ and scroll down to the ‘Download the source code’ link (dead link)
- GravityWellsSourceCode - The source code of a fullscreen opengl Cocoa game
-
ReadWriteCSVAndTSV - Dealing with CSV (Comma Separated Values) and TSV (Tab Separated Values) in Cocoa
- Sample Code from Apple
*http://developer.apple.com/samplecode/Sample_Code/Cocoa.htm
*http://developer.apple.com/samplecode/Sample_Code/DiscRecording.htm