Unless you suffer from Not Invented Here Syndrome, you most likely enjoy using open source iOS code that other developers share via github (or other places) as much as I do. Whenever I see a useful new piece of code, be it a whole library or just a simple class, I immediately want to check out how it works and begin to think about how and where I can use it in an actual project. In other cases, I have a particular problem that I need a solution for and I may check to see whether I can find something suitable which already solved that particular problem. Then there's also the case where I develop a solution and open-source it for everyone to use.
Over the past few weeks, I compiled a list of what I think are useful and/or interesting open source iOS libraries/classes, focussing solely on components that provide some sort of drop-in UI and leaving out anything that doesn't require linking against UIKit. If there is enough interest, I may write another blog post on non-UI components in the future.
So, without further ado, here are some components that can be useful in one of your next iOS projects, or which you simply might find interesting to play around with. Some of these are well known, but hopefully you'll find something you didn't know existed.
The library uses modular design, so developers can choose which parts of the library to use in their own projects, or develop extensions on their own.
Among the things the library offers is a launcher which resembles the standard SpringBoard on Apple's iOS devices. Three20's URL-based navigation all across the app brings with it persistence, to ensure a smooth user experience even if the app was terminated while in the background.
One of the most popular components is the photo viewer, which uses the standard datasource pattern to mimick the user interface of Apple's own Photos app. The message composer emulates Apple's Mail app to send any kind of message and is completely customizable, including autocompletion of recipient names, based on a data source you provide.
There are also a number of clever components to facilitate the use of remote content in your app, such as an image view which takes a URL as a parameter and loads and displays the content by itself and a similar class for a table view. This is useful in a lot of cases and can vastly reduce the amount of glue code a developer has to produce.
Another notable component is the built-in HTTP disk cache, since the default iOS component only uses a RAM cache - and as we all know, RAM is a scarce resource of many iOS devices and its contents will be lost when an app is shut down.
Perhaps the second biggest library after Three20, Tapku also emulates a lot of what Apple has built into their apps that come with iOS, but has left out of the Cocoa Touch APIs. A prominent example of this is Coverflow, which Apple uses in the iPod app when in landscape orientation. I've used Tapku in the past for its calendar component, which closely resembles what Apple uses in their Calendar app.
The library comes with an example project, so you can check out each component before you add the code to your app.
One of the not so strong points of iOS is user-adjustable preferences. The Apple-approved way of dealing with such preferences is to use a settings bundle, which will automatically appear in the Settings app. There are a number of advantages to this approach, such as consistency across application, but it also means that the user has to specifically look out for an entry for your app in Settings in order to make changes - or they have to be told that there is such a possibility, which is plain annoying.
Enter InAppSettingsKit, which allows you to mimic the behaviour and style found in Settings.app inside your own app, based on your settings bundle (although there are customization options). The library provides a uniform experience for your users along with great ease-of-use.
Many people nowadays use social networks as a large part of how they communicate with their friends and relatives, and to find information and entertainment. Users commonly share items they find interesting with their friends on social networking sites, and it can make sense for your app to allow users to easily share things.
This is where ShareKit comes in. It provides an easy method to provide sharing functionality for a number of social networks (such as Facebook, Twitter and Delicious) plus e-mail. The library's design is rather smart, to it will only offer those services which support the type of content the user wants to share, such as URLs, images, text or files. It even works offline out of the box and will persistently store items which can then be send when a connection is available.
Route-Me is an open-source replacement for large parts of MapKit, including support for various map sources. As of now, it supports OpenStreetMap, Microsoft VisualEarth (now Bing Maps) and CloudMade out of the box. There are classes for various other map sources, such as Yahoo!, but those are included only for demonstration purposes and are not intended to be used in an actual application for licensing reasons.
Ever since iOS 4.0 introduced over-the-air installing, developers have been finding interesting ways to use it, especially to facilitate distribution of ad-hoc builds, which are commonly used for beta testing purposes.
Hockey uses this approach to really make it easy on users to install new versions of apps they offering code for both PHP5-enabled servers and an iOS component which allows for in-app updates, including support for update notifications.
The client library is optional though, so Hockey can also be used for installing and updating apps from Safari.
In the past few years, we've seen a lot of UI innovation come from 3rd party developers, such as Tweetie's (now Twitter for iPhone) pull to refresh (see EGOTableViewPullRefresh below) and Reeder's status bar overlays that indicate current progress without wasting valuable screen estate.
MTStatusBarOverlay replicates this status bar overlay and makes it easy for developers to implement this kind of behaviour in their own apps, along with extensions such as a detail view that pops out of the status bar.
Written by yours truly for Folio Case, this is more an example of showing how to use Key-Value-Observing (KVO) in order to react to UI changes than a complete 3rd party library, but it should be able to adopt it for usage in your own apps without too much hassle.
This example allows developers to add a callout view to UISliders, thus giving users direct feedback on their actions in the same place where they are currently focusing on anyway.
Ever since Loren Brichter came up with the pull-to-refresh mechanism in Tweetie (now Twitter for iPhone), other developers have tried to emulate the behaviour. One such implementation is enormego's EGOTableViewPullRefresh, which comes pretty close to Brichter's original (sans sound effects).