Source Code


The following Cocoa Xcode projects are made available under the Creative Commons Attribution license. You can do anything you want with them, as long as you give me some credit.


DBBackgroundCheck 1.1

This is the project associated with my tutorial on creating backgrounds behind other objects. It shows how to use a custom NSView as a background, and how to stick an image in an NSColor that can then be used as a window background color.

[Tutorial]   [Download]



DBBackgroundView 1.0

A custom NSView designed to display commonly used backgrounds behind other objects. It can display a solid color, a pattern, a gradient, or an image. You can also set the transparency and corner radius of the background.

[Documentation]   [Download]



DBInterfaceDemo 1.0

Unfortunately you can’t create an interface like the one in Apple Mail using just the tools available in Interface Builder. So this project creates an Apple Mail-style interface by combining classes and source code that’s been made freely available by other developers.

[Documentation]   [Download]



DBOverlayWindow 1.0

This class, based on portions from Matt Gemmell’s RoundedFloatingPanel class, displays a semi-transparent floating window similar to the one you see when typing Command-tab to switch applications. It differs from Matt’s class in that it uses a separate window to display the contents, so text appears crisper and objects in the window can cast a shadow on the window background.

[Documentation]   [Download]



DBPrefsWindowController 1.1.2

An NSWindowController subclass that sets up and manages your preferences window for you. Just supply the custom views to display, the toolbar icons, and then add one line of code for each toolbar button/view combination to display in the window. This class also provides an optional fade transition between the views.

[Documentation]   [Tutorial]   [Download]