Recessed Source List
The Recessed Source List project is a simple set of Objective-C / Cocoa view subclasses that provide the same visual effect seen in the search results list of Mac OS’s Dictionary.app (pictured below).
Details
The custom split view (which must be in thin line divider mode) draws a standard line with a fade at the top and bottom. The left pane is a custom NSView that draws the shadow with a similar fade at top and bottom. The table view leaves room at the top and bottom (I use 11 pixels) to allow the left pane’s fade to show up and draws the same shadow. The backing view is necessary because the table’s top edge moves when scrolled (kind of obvious) so the “fade” would move as well if the table were to draw it.
Usage
Just drop the class into your project. In Interface Builder, open the XIB(s) containing the token fields whose behavior you wish to change, then change their class name to NonSelectingTokenField. Build, run, and enjoy the wonder that is Cocoa.
- Copy all the source files from the controls subfolder of the demo project into your own project.
- Create a source-list-on-the-left split view setup as seen in the demo app’s MainMenu.xib (copy and paste is easiest).
- There is no step 3.
LicenseThis source code is free to use in any private, public, or commercial software products with attribution. See License.txt in the downloaded zip file for details.
Source
[button link="http://media.nozzi.name/sourcecode/RecessedSourceList.zip" style="green" size="large"]Download Source[/button]



