-
Get the code
-
Clone the
three20
git reposito ry:git clone git://github.com/facebook/three20 .git
-
-
Add the library to the project
-
Drag
Three20 .xcodeproj
fromsrc/Three20 /
into your project . -
Select the
Three20 .xcodeproj
item in Xcode that you just created and look at the "Detail" tab. -
Ensure that the checkbox beside
libThree20 .a
is checked. If not, check it.-
Alternatively, you can expand the Three20 project and drag
libThree20 .a
to your target's "Link Binary With Libraries" action.
-
-
-
Make the library a dependency
-
In Xcode's app menu, click Project ⇒ Edit Active Target.
-
Click the "General" tab.
-
Click the plus butto n below "Direct Dependencies" and add Three20 .
-
Click the "Build" tab.
-
Add
../three20 /Build/Products/three20
to "Header Search Paths".-
Note: Change the relative path (
../
) accordingly.
-
-
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.
-
-
Add the resource bundle
-
Locate
Three20 .bundle
underthree20 /src
and drag and drop it 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 ".
-
-
Add the Core Animation framework
-
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 .
-
-
Done!
-
Do
#import <Three20 /Three20 .h>
anywhere you want to use Three20 classes in your project .
-
Adding Three20 to your Xcode project
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.