Last Revision:
Version 1.1, 2012-10-04
Upgraded to OS X 10.8 to eliminate build warnings, now uses NSDictionary to back each table row, App Sandboxing enabled.
(Full Revision History)
Build Requirements:
Xcode 4.4, OS X 10.8
Runtime Requirements:
OS X 10.7 or later

Demonstrates how to use view-based NSTableViews in your application, complete with custom drawing and mouse tracking.

It subclasses NSTableView's drawGridInClipRect for custom grid drawing as well as "setFrameSize:size" to invalidate more elements when live-resizing occurs. The sample implements a custom NSTableRowView class that tracks the mouse to achieve an elegant selection appearance. The overrides for this include:

Override point to draw a custom background: drawBackgroundInRect:dirtyRect Override point for drawing the (horizontal) separator: drawSeparatorInRect:dirtyRect Override point for drawing the selection: drawSelectionInRect:dirtyRect