Three20 – Three20介绍

来源:互联网 发布:五星宏辉分析软件 编辑:程序博客网 时间:2024/04/28 18:25

最近看了一些iPhone开发的东西,多了解一下也挺好的,所以做一些笔记,纯属笔记,不是什么高深的教程,所以入门看最好了,高手就忽悠悠的飘过吧。:)。Three20是一个还不错的框架,入门的话,做UI可以使用这个框架,可以实现很多豪华的效果而且也不费劲,不过有些地方设计的确实有些不太好用,但是大多数使用来说,还是蛮赞的了。比如下面这个。

本来自己搞搞也可以搞的,但是比较麻烦,用这个框架之后就变得非常简单了。所以先了解一下这个框架。Three20,也可以叫320,可以去官方网站去了解一下,可惜文档比较少,很多东西只能看sample来了解。大概按照官方的介绍来说:

Three20 is a open source Objective-C library used by dozens of well-known brands in the App Store, including Facebook, Posterous, Pulse, Meetup.com, and SCVNGR. Three20 provides powerful view controllers such as the Launcher, the popular Photo Browser, and internet-aware tables.

The library is modular, meaning you choose which elements of the library to include in your app. This modular design allows Three20 to be one of the only Objective-C frameworks that encourages what are called ‘extensions’ from the community.

大意就是Three20是一个开源的Object-C框架,有很多应用已经使用了,包括Facebook之类之类等等。而且新的Three20基本上已经组件化了,使用起来非常方便。也可以看有多少应用在使用这个框架,反正确实挺多的。

安装比较简单,先从官方下载下下来最新的包,然后解压缩就可以了,然后就可以引入到自己的项目中,也可以创建一个Three20应用。

如果是引入到自己的项目中的话,可以使用如下方法。

可以使用320给的一个脚本引入,脚本如下。

> python three20/src/scripts/ttmodule.py

可以使用上面的脚本引入到自己项目中。

> python three20/src/scripts/ttmodule.py -p path/to/myProject.xcodeproj -c Debug -c Release Three20

这样就能够在自己的项目中使用#import了。

如果是想开始创建项目的时候就创建Three20项目的话,可以使用如下方法。

> git://github.com/facebook/three20.git 无需使用root权限

> 源码check out之后,进入/three20/tempate目录,然后在其下面输入命令: bash InstallTemplates.Command,或者看相应的版本运行相应的脚本。

然后在XCODE中创建新项目就有选项了。






原创粉丝点击