TTPhotoViewController使用向导

Three20库是再好不过的iPhone开发资源了,尤其是其中提供的TT图片视图控制器提供了简单易用的图片浏览功能,下面我就简单的介绍了一下如何使用TTPhotoViewController
/*********************************************************************************************/首先我们建立一个TTPhotoViewController的子类:
@interface LibDetailViewController : TTPhotoViewController {
然后在viewDidLoad代理方法中添加数据源(datasource)
... ... for (NSInteger i=1; i<=libLength; i++) { picIndex = [Zeros stringByAppendingString:[NSString stringWithFormat:@"%d",i]]; picIndex = [picIndex substringFromIndex:([picIndex length] - libDigits)]; [photosArray addObject:[[[MockPhoto alloc] initWithURL:[NSString stringWithFormat:@"%@%@/o/%@%@%@.jpg",addr,libName,libName,addiPage,picIndex] smallURL:[NSString stringWithFormat:@"%@%@/%@%@%@.jpg",addr,libName,libName,addiPage,picIndex] size:CGSizeMake(320, 480)]autorelease]]; //这一行是最重要了,因为TTPhotoViewController需要的是一个TTPhotoSource作为数据源对象, //但是这个对象其实就是一个TTPhoto的数组,所以我们在这里创建并添加所有的图片信息到一个可变数组内。 } self.photoSource = [[[MockPhotoSource alloc] initWithType:MockPhotoSourceDelayed title:libTitle photos:photosArray photos2:nil] autorelease]; //这里初始化并赋值这个TTPhotoSource对象到self.photoSource上 [photosArray release]; //由于self会retainphtosArray,所以可以release掉它了。
我在这里使用了Three20样例sample里面的类MockPhotoSource来创建TTPhoto和TTPhotoSource对象。
就这么简单,你就可以使用TTPhotoViewCotroller的便利咯~
请问,这个320库是哪里的?能否劳烦把URL发给我,谢谢
http://joehewitt.com/post/the-three20-project/
http://github.com/facebook/three20