Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 184 lines (142 sloc) 9.744 kb
9c6d6a2 Joe Hewitt First commit
joehewitt authored
1 Three20
2 =======
3
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
4 Three20 is a collection of iPhone UI classes, like a photo viewer, and general
5 utilities, like an HTTP disk cache. Three20 is derived from the
6 [Facebook iPhone app][], which is one of the most downloaded iPhone apps ever.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
7
8 [![](http://farm4.static.flickr.com/3447/3378092101_40a62a04b2_m.jpg)](http://farm4.static.flickr.com/3447/3378092101_b064d8e339_o.jpg)
9 [![](http://farm4.static.flickr.com/3432/3378117315_846547cfba_m.jpg)](http://farm4.static.flickr.com/3432/3378117315_3bf905bdb6_o.jpg)
10 [![](http://farm4.static.flickr.com/3462/3378171111_ec1208541d_m.jpg)](http://farm4.static.flickr.com/3462/3378171111_666173111d_o.jpg)
11 [![](http://farm4.static.flickr.com/3646/3378998444_d0534d337f_m.jpg)](http://farm4.static.flickr.com/3646/3378998444_8d3b1eeef8_o.jpg)
12 [![](http://farm4.static.flickr.com/3552/3378940896_7b23cca98e_m.jpg)](http://farm4.static.flickr.com/3552/3378940896_8ccb5ea1c8_o.jpg)
c25b266 Joe Hewitt * Update the README with new instructions
joehewitt authored
13 [![](http://farm4.static.flickr.com/3382/3425636810_483f1b65a6_m.jpg)](http://farm4.static.flickr.com/3382/3425636810_b0a578bb22_o.jpg)
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
14
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
15 Community
16 =========
17
18 If you would like to ask any questions regarding Three20, please check out any of the following:
19
20 * [Three20.info][]
21 * [Three20 Mailing List][]
8bbefeb John Wang README updated for TTModule Install
jwang authored
22 * [Three20 Tagged Questions on StackOverflow][]
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
23
2d63ff2 Adar Porat updating README with a documentation section
aporat authored
24 Documentation
25 ==============================
26
27 You can access Three20 API documentation in several ways:
28
29 1. Online: http://facebook.github.com/three20/api
30 1. Within Xcode:
31 1. Open your Xcode Preferences (`⌘,`) and switch to Documentation tab.
32 1. Click the `+` button
33 1. Add the Three20 doc set feed: `feed://facebook.github.com/three20/api/com.facebook.Three20.atom`
34 1. Generate the documentation from the project repository with the `src/scripts/docs.py` script
35
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
36 Adding Three20 to your project
37 ==============================
38
8bbefeb John Wang README updated for TTModule Install
jwang authored
39 Three20 is compiled as static libraries. It use Xcode's "dependent project" facilities.
40 There are two methods of adding Three20 to your project.
41
42 The first is with the [TTModule Python Script][].
43
44 The Second option is to add it to your project manually. Here is how:
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
45 **Estimated time:** 5 minutes.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
46
621473b Jeff Verkoeyen Closes #106. Update the README to reference the new repo location.
jverkoey authored
47 1. Clone the three20 git repository: `git clone git://github.com/facebook/three20.git`. Make sure
c2049af Joe Hewitt * README tweaks
joehewitt authored
48 you store the repository in a permanent place because Xcode will need to reference the files
49 every time you compile your project.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
50
1960191 Jeff Verkoeyen Update the README to reflect the new project locations.
jverkoey authored
51 2. Locate the "Three20.xcodeproj" file under "`three20/src/Three20/`". Drag Three20.xcodeproj and
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
52 drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will
53 appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project"
1960191 Jeff Verkoeyen Update the README to reflect the new project locations.
jverkoey authored
54 before clicking "Add".
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
55
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
56 3. Open the Three20 Xcode Project that you just added to your app and expand the "Dependencies"
57 group. Select all of the projects listed there and drag them to your app as well. You should
58 now have the following list of Three20 projects added to your app:
59 * Three20Core
60 * Three20Network
61 * Three20Style
62 * Three20UICommon
63 * Three20UINavigator
64 * Three20UI
65 * Three20
66
67 4. Now you need to link the Three20 static libraries to your project. Select all of the
68 project items that you just added to the sidebar. Under the "Details" table, you will see
69 a number of items, such as libThree20.a and libThree20Core.a. Check the checkbox on the
70 far right for each of the `lib` files (not the UnitTests). This will link each part of the
71 Three20 framework to your app.
72
73 5. Now you need to add Three20 as a dependency of your project, so Xcode compiles it whenever
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
74 you compile your project. Expand the "Targets" section of the sidebar and double-click your
75 application's target. Under the "General" tab you will see a "Direct Dependencies" section.
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
76 Click the "+" button, select "Three20" and each of the other libs, and click "Add Target".
77 You do *not* need to add the `UnitTests` target for each lib.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
78
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
79 6. Now you need to add the bundle of images and strings to your app. Locate "Three20.bundle" under
20638f8 Joe Hewitt * Add a missing step to README instructions
joehewitt authored
80 "three20/src" and drag and drop it into your project. A dialog will appear -- make sure
81 "Create Folder References" is selected, "Copy items" is unchecked, and "Reference Type" is
82 "Relative to Project" before clicking "Add".
83
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
84 7. Now you need to add the Core Animation framework to your project. Right click on the
c25b266 Joe Hewitt * Update the README with new instructions
joehewitt authored
85 "Frameworks" group in your project (or equivalent) and select Add > Existing Frameworks.
86 Then locate QuartzCore.framework and add it to the project.
87
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
88 8. Finally, we need to tell your project where to find the Three20 headers. Open your
c2049af Joe Hewitt * README tweaks
joehewitt authored
89 "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click
1960191 Jeff Verkoeyen Update the README to reflect the new project locations.
jverkoey authored
90 it. Add the relative path from your project's directory to the
91 "three20/Build/Products/three20" directory.
7bab43f Joe Hewitt * Minor code style tweaks and documentation updates
joehewitt authored
92
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
93 9. While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and
d77ad02 Joe Hewitt * Fix the photo viewer and message composer is iPhone OS 3.0
joehewitt authored
94 add "-ObjC" and "-all_load" to the list of flags.
3274e6d * Update README to make instructions regarding the compiler flags more c...
Joe Hewitt authored
95
2e63cc6 Jeff Verkoeyen Update the README.
jverkoey authored
96 10. You're ready to go. Just #import "Three20/Three20.h" anywhere you want to use Three20 classes
7bab43f Joe Hewitt * Minor code style tweaks and documentation updates
joehewitt authored
97 in your project.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
98
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
99 An Overview of Three20
100 ======================
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
101
102 Photo Viewer
103 ------------
104
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
105 [TTPhotoViewController][] emulates Apple's Photos app with all of its flick n' pinch delight.
106 You can supply your own "photo sources", which works similiarly to the data sources used by
107 UITableView. Unlike Apple's Photos app, it isn't limited to photos stored locally. Your
108 photos can be loaded from the network, and long lists of photos can be loaded incrementally.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
109
110 Message composer
111 ----------------
112
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
113 [TTMessageController][] emulates the message composer in Apple's Mail app. You can customize it
114 to send any kind of message you want. Include your own set of message fields, or use the
115 standard "To:" and "Subject:". Recipient names can be autocompleted from a data source that
116 you provide.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
117
118 Web image views
119 -----------------------
120
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
121 [TTImageView][] makes it as easy to display an image as it is in HTML. Just supply the URL
122 of the image, and TTImageView loads it and displays it efficiently. TTImageView also works
123 with the HTTP cache described below to avoid hitting the network when possible.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
124
125 Internet-aware table view controllers
126 ---------------------------------------
127
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
128 [TTTableViewController][] and [TTTableViewDataSource][] help you to build tables which load
129 their content from the Internet. Rather than just assuming you have all the data ready to go,
130 like UITableView does by default, TTTableViewController lets you communicate when your data is
131 loading, and when there is an error or nothing to display. It also helps you to add a "More"
132 button to load the next page of data, and optionally supports reloading the data by shaking the
133 device.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
134
135 Better text fields
136 ------------------
137
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
138 [TTTextEditor][] is a UITextView which can grow in height automatically as you type. I use
139 this for entering messages in Facebook Chat, and it behaves similarly to the editor in Apple's
140 SMS app.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
141
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
142 [TTPickerTextField][] is a type-ahead UITextField. As you type it searches a data source, and
143 it adds bubbles into the flow of text when you choose a type-ahead option. I use this in
144 TTMessageController for selecting the names of message recipients.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
145
146 HTTP disk cache
147 --------------
148
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
149 [TTURLRequest][] is a replacement for NSURLRequest which supports a disk cache (NSURLRequest
150 can only cache in RAM). It has some other nice features too. HTTP posts are as easy as
151 supplying a dictionary of parameters. The TTURL loading system can also be suspended and
152 resumed at any time, which is a great performance helper. Network threads often fight with
153 the UI thread, so you can suspend the network any time your app is momentarily graphically
154 intensive.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
155
156 URL-based Navigation
157 --------------------
158
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
159 [TTNavigator][] is for those grizzled old web developers like myself who want to
160 organize their app by "pages" which can be displayed by visiting a URL.
161
162 Your view controllers can simply register URL patterns that they handle, and when those URLs
163 are visited the controllers will be created and displayed. You can also register generic
164 actions that are called when a URL is visited.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
165
1960191 Jeff Verkoeyen Update the README to reflect the new project locations.
jverkoey authored
166 TTNavigator also persists and restores the full path of navigation controllers and modal
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
167 view controllers, so your users can quite the app and come back exactly where they left off.
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
168
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
169 Learn more at [Three20.info][]
d7bbd11 Joe Hewitt * Rename "href" to "url" and "stroke" to "border"
joehewitt authored
170
171 [Facebook iPhone app]: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284882215&mt=8
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
172 [Three20.info]: http://Three20.info
173 [Three20 Mailing List]: http://groups.google.com/group/three20/
8bbefeb John Wang README updated for TTModule Install
jwang authored
174 [Three20 Tagged Questions on StackOverflow]: http://stackoverflow.com/questions/tagged/three20
643ec64 Jeff Verkoeyen Clean up the README and add community links.
jverkoey authored
175 [TTPhotoViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPhotoViewController.h
176 [TTMessageController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTMessageController.h
177 [TTImageView]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTImageView.h
178 [TTTableViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewController.h
179 [TTTableViewDataSource]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewDataSource.h
180 [TTURLRequest]: http://github.com/facebook/three20/blob/master/src/Three20Network/Headers/TTURLRequest.h
181 [TTTextEditor]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTextEditor.h
182 [TTPickerTextField]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPickerTextField.h
183 [TTNavigator]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTNavigator.h
8bbefeb John Wang README updated for TTModule Install
jwang authored
184 [TTModule Python Script]: http://three20.info/article/2010-10-06-Adding-Three20-To-Your-Project
Something went wrong with that request. Please try again.