随笔 - 65  文章 - 0  评论 - 21  阅读 - 32万

【Three20】手动添加Three20(XCode 4.6)

github:https://github.com/facebook/three20

官方网站:http://three20.info

 

参考:http://chepri.com/visual-guide-manually-adding-three20-xcode-4-project/

 

1、添加Three20.xcodeproj

“add Files to”,在three20/src/Three20目录下,选择Three20.xcodeproj,在弹出的对话框中,请保证反选“Copy items into destination group's folder”选项,点击“add”按钮添加

 

2、添加其它依赖.xcdeproj项目

打开Three20.xcodeproj,展开Dependencies group,看到以下.xcodeproj项目文件

  • Three20Core.xcodeproj
  • Three20Network.xcodeproj
  • Three20Style.xcodeproj
  • Three20UICommon.xcodeproj
  • Three20UINavigator.xcodeproj
  • Three20UI.xcodeproj

全部选中,拖拽到项目中

 

3、连接Three20静态库

Targests -> Build Phases -> Link Binary With Libraries

添加静态库:

  • Three20.a
  • Three20Core.a
  • Three20Network.a
  • Three20Style.a
  • Three20UICommon.a
  • Three20UINavigator.a
  • Three20UI.a

 

4、添加依赖

Targests -> Build Phases -> Target Dependencies

添加依赖项:

  • Three20
  • Three20Core
  • Three20Network
  • Three20Style
  • Three20UICommon
  • Three20UINavigator
  • Three20UI

 

5、添加bundle文件

“add Files to”,在three20/src目录下,选择Three20.bundle,在弹出的对话框中,请保证反选“Copy items into destination group's folder”选项,点击“add”按钮添加

 

6、添加framework

Targests -> Build Phases -> Link Binary With Libraries

添加QuartzCore.framework

 

7、设置Three20头文件搜索目录

Targets -> Build Settings -> Search Paths -> User Header Search Paths

添加如下内容(注意:带双引号):

"$(BUILT_PRODUCTS_DIR)/../three20"

"$(BUILT_PRODUCTS_DIR)/http://www.cnblogs.com/three20"

Targets -> Build Settings -> Search Paths -> Header Search Paths

添加如下内容:

./three20/Build/Products/three20

 

 

8、设置Other Linker Flags

Targets -> Build Settings -> Linking -> Other Linker Flags

添加如下内容:

-ObjC

-all_load

 

编译,UIViewAdditions.h和UIViewAdditions.m报错!!!

解决方案:

将 #ifdef DEBUG 修改为 #ifdef DEBUG_TOUCHES

参考:

1、http://www.xuanyusong.com/archives/1818

2、https://github.com/cogenta/three20-1.0.5/commit/be70e1ff3965c0ff4f7598bf5213349629a27540

 

使用:

导入头文件

#import "Three20/Three20.h"

 

 

 

posted on   Anthony Li  阅读(754)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
< 2013年3月 >
24 25 26 27 28 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

博客园博客已停止更新,博客地址:dyinigbleed.com

点击右上角即可分享
微信分享提示