Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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