dima / three20 forked from facebook/three20

Three20 is an Objective-C library for iPhone developers

This URL has Read+Write access

commit  6b348e200bfe3b653cd986f1b42ff5141651b418
tree    b1b7ac3da5836106a0977e73b0a657e82f5913d6
parent  b9e15a158682961fccd8d122c7a14894952084b4 parent  d0ea03bf940360d5db359f59628a3cb5ccc0c5ea
name age message
file .gitignore Thu May 28 18:30:56 -0700 2009 * One more iPhone OS 3.0 fix * Merged code from... [Joe Hewitt]
file AUTHORS Sat Dec 05 17:43:07 -0800 2009 Update AUTHORS and CHANGES with this week's cha... [jverkoey]
file CHANGES Fri Dec 18 19:23:10 -0800 2009 Update CHANGES for this week. [jverkoey]
file LICENSE Thu Jan 22 22:29:27 -0800 2009 First commit [Joe Hewitt]
file README.mdown Mon Nov 16 23:13:09 -0800 2009 fixed instructions to include the recursive che... [uprise78]
file diffstrings.py Mon Dec 14 19:13:30 -0800 2009 Make the --merge functionality of diffstrings a... [Owen Yamauchi]
file project.dev Mon Mar 23 16:29:49 -0700 2009 * Rename "href" to "url" and "stroke" to "borde... [Joe Hewitt]
directory samples/ Sat Dec 12 11:11:06 -0800 2009 update P31 classes to use the new includes (TTG... [uprise78]
directory src/ Sun Dec 20 13:55:05 -0800 2009 Merge branch 'master' of git://github.com/upris... [dima]
README.mdown

Three20 - Prime31 Fork

Three20 is a collection of iPhone UI classes, like a photo viewer, and general utilities, like an HTTP disk cache. Three20 is derived from the Facebook iPhone app, which is one of the most downloaded iPhone apps ever.

The Prime31 fork of Three20 removes all private API calls so that apps made with it can get through the App Store approval process.

Adding Three20 - Prime31 to your project

Three20 is compiled as a static library, and the easiest way to add it to your project is to use Xcode's "dependent project" facilities. Here is how:

  1. Clone the three20 - Prime31 git repository: git://github.com/uprise78/three20-P31.git. Make sure you store the repository in a permanent place because Xcode will need to reference the files every time you compile your project.

  2. Locate the "Three20.xcodeproj" file under "three20/src". Drag Three20.xcodeproj and drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project" before clicking "Add".

  3. Now you need to link the Three20 static library to your project. Click the "Three20.xcodeproj" item that has just been added to the sidebar. Under the "Details" table, you will see a single item: libThree20.a. Check the checkbox on the far right of libThree20.a.

  4. Now you need to add Three20 as a dependency of your project, so Xcode compiles it whenever you compile your project. Expand the "Targets" section of the sidebar and double-click your application's target. Under the "General" tab you will see a "Direct Dependencies" section. Click the "+" button, select "Three20", and click "Add Target".

  5. Now you need to add the bundle of images and strings to your app. Locate "Three20.bundle" under "three20/src" and "Prime31.bundle" under "three20/src/P31-Additions/" and drag and drop them into your project. A dialog will appear -- make sure "Create Folder References" is selected, "Copy items" is unchecked, and "Reference Type" is "Relative to Project" before clicking "Add".

  6. Now you need to add the Core Animation framework to your project. Right click on the "Frameworks" group in your project (or equivalent) and select Add > Existing Frameworks. Then locate QuartzCore.framework and add it to the project.

  7. Finally, we need to tell your project where to find the Three20 headers. Open your "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click it. Add the relative path from your project's directory to the "three20/src" directory. Make sure to click the "Recursive" checkbox so that all paths inside three20 get scanned for headers.

  8. While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and add "-ObjC" and "-all_load" to the list of flags.

  9. You're ready to go. Just #import "Three20/Three20.h" anywhere you want to use Three20 classes in your project.