Iphone 如何在缩略图视图中启动Three20照片查看器?
我遵循教程,它非常清晰,工作完美,我的问题是,如何在缩略图视图中启动Three20照片查看器Iphone 如何在缩略图视图中启动Three20照片查看器?,iphone,ios,three20,thumbnails,Iphone,Ios,Three20,Thumbnails,我遵循教程,它非常清晰,工作完美,我的问题是,如何在缩略图视图中启动Three20照片查看器 我非常感谢您的指导或帮助。您应该使用TTThumbsViewController而不是TTPhotoViewController。在three20 TTCategory示例应用程序中有一个很好的例子 TTThumbsViewController还使用照片源,因此您不必更改那么多代码。照片查看器应扩展TTThumbsViewController并实现TTThumbsViewControllerDelega
我非常感谢您的指导或帮助。您应该使用
TTThumbsViewController
而不是TTPhotoViewController
。在three20 TTCategory示例应用程序中有一个很好的例子
TTThumbsViewController
还使用照片源,因此您不必更改那么多代码。照片查看器应扩展TTThumbsViewController
并实现TTThumbsViewControllerDelegate
委派功能
您可以在viewDidLoad函数中加载照片源:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)viewDidLoad {
NSMutableArray* photos = [NSMutableArray array];
for (int i=kImagesCount;i>=1;i--) {
Photo* photo = [[[Photo alloc] initWithURL:[NSString stringWithFormat:@"bundle://%d.png", i]
smallURL:[NSString stringWithFormat:@"bundle://%dt.png", i]
size:CGSizeMake(400, 400)] autorelease];
[photos addObject:photo];
}
self.photoSource = [[PhotoSource alloc]
initWithType:PhotoSourceNormal
title:@"Select Picture"
photos:photos
photos2:nil];
}
谢谢你,我明天早上第一件事就是测试一下,然后告诉你。