You may use the following source code free of charge within the terms of a BSD style license. This license requires that you attribute the source code to Philip Dow / Sprouted. For more information about this license, or to purchase a non-attribution license for your product, refer to the Licensing details.


Platform: iOS
License: BSD

SPFacebookClient is a lightweight wrapper around the shoddy Facebook iOS SDK. The wrapper includes a shared singleton client object which manages authentication and session data and which provides access to the API calls using blocks based methods. Set your application identifier and permissions in a custom subclass and the rest is a snap.

For example, log in with a single line of code:

[[SPExampleFacebookClient sharedClient] login:^(BOOL success, id result, NSError *error) {

Likewise, make calls to the Graph API with a single line:

[[SPExampleFacebookClient sharedClient] requestWithPath:@"me/friends" completionHandler:^(BOOL success, id result, NSError *error) {

Or an FQL Query:

[[SPExampleFacebookClient sharedClient] requestWithQuery:@"SELECT uid, name, pic FROM user WHERE uid=me()" completionHandler:^(BOOL success, id result, NSError *error) {

Nice, huh? Blocks make everything better. SPFacebookClient is available under a BSD license and can be download from the SPFacebookClient Github repository.


Platform: Mac OS 10.6+
License: BSD

SPColorWell implements an iWork-esque color well and pop-up color picker for changing the color of an arbitrary selection. Drop the source files into your project and add a custom NSView to your NIB file, changing its class to SPColorWell.

The only glue work you need to worry about is mediating the color displayed in the color well and the color of the current selection in the view with which it is associated. The app delegate demonstrates how to do this with an NSTextView.

SPTextAndHeaderView is Mac OS 10.6+ compatible and uses Objective-C 2.0 language features.

Download SPColorWell


Platform: Mac OS 10.6+
License: BSD

SPTextAndHeaderView is a custom view subclass meant to be used as the document view of a scroll view. It allows you to lay out a header view alongside a text view inside a single NSScrollView.

Scroll views manage single document subviews, for example, a single text view. As the text view changes its geometry because of user input, the scroll view adjusts its clip view to encompass the visible area.

There has been a need to lay out additional views alongside the text view while keeping everything within the text view’s enclosing scroll view. Scrolling can then encompass all the views, so that with a vertical scroll a header view will eventually disappear, falling outside the scroll view’s clipping area. Apple’s Mail program exhibits this behavior when reading messages. Normally, scrolling would only scroll the text, keeping the header view visible. This behavior is not always desirable.

SPTextAndHeaderView coordinates between a header view, which itself can contain any kind and number of subviews, a text view, and an enclosing scroll view. The header view is kept in place at the top, while changes to the text view’s geometry are mediated to the enclosing scroll view. The class remains compatible with the system’s ruler APIs.

SPTextAndHeaderView is Mac OS 10.6+ compatible and uses Objective-C 2.0 language features.

Download SPTextAndHeaderView


Platform: Mac OS 10.6+
License: BSD

CHNotebookTextContainer implements a general algorithm for wrapping text around rectangular media embedded in an NSTextView, a capability not supported by the native text system. The class accomplishes this by overriding the lineFragmentRectForProposedRect: sweepDirection: movementDirection: remainingRect: method. This is one of the core layout classes used in Per Se.

The algorithm takes into account any number of rectangular holes in the container geometry in any configuration along both the x and y axis.

This class handles only the geometry of the text container in isolation from a number of other important UI functionality, such as placement of media and drag and drop. A complete page layout system will likely incorporate custom NSLayoutManager and NSTextView classes.

For more information refer to the NSTextContainer, Text System Overview, and the Text System Storage Layer Overview documentation.

CHNotebookTextContainer is Mac OS 10.6+ compatible and uses Objective-C 2.0 language features.

Download CHNotebookTextContainer


Platform: Mac OS 10.6+
License: BSD

SPSearchStore is an Obj-C wrapper for the SearchKit API. SearchKit offers powerful document indexing and “google-like” querying to CoreFoundation apps. SPSearchStore makes the API accessible to Cocoa applications by way of a simple public interface.

SPSearchStore also provides access to the complete two-way to-many documents / terms graph contained in a SearchKit index, establishing the foundation for more complex analysis based on the semantic relationships among an arbitrary collection of documents.

SPSearchStore is thread safe. You may use multiple threads to read from and write to the search store. SPSearchStore uses locks to manage access to the underlying data.

This class is code refactored directly out of the Journler source base and is the foundation of all of Journler’s searching and lexical capabilities. SearchKit is a stupid powerful API and I would love to see SPSearchStore become the basis of some crazy semantic software.

SPSearchStore is Mac OS 10.6+ compatible and uses Objective-C 2.0 language features as well as blocks programming.

Read more

Download SPSearchStore


Platform: Mac OS 10.5+
License: BSD

SPGroupedTabView is a two-tiered or grouped tab view suitable for providing access to a wide variety of information in a limited space. It can be employed when the user needs to view or interact with only a portion of that information at a time.

The view is composed of a top row which displays an icon and title for each group, a second row underneath which displays a list of tabs associated with a given group, and a space underneath this for a content view. The view uses the data source and delegate patterns to acquire model information from a controller. A different view or view controller may be loaded for each tab or the same view (controller) may have its content modified as the selection changes.

The view comprises a single source file and header. Add it to your project and implement a few data source and delegate methods. The view supports some customization, allowing for different color schemes, but mostly the view works as-is out of the box. A sample project is included which demonstrates the data source and delegate protocols.

The class is Mac OS 10.5+ compatible and uses Objective-C 2.0 language features.

Download SPGroupedTabView

Leave a Reply