现在的位置: 首页 > 综合 > 正文

iphone three20 How to Start Three20 Photo Viewer in Thumbnail view?

2013年06月18日 ⁄ 综合 ⁄ 共 949字 ⁄ 字号 评论关闭

1原文地址:http://stackoverflow.com/questions/7499591/how-to-start-three20-photo-viewer-in-thumbnail-view

 

 

You should use TTThumbsViewController instead of TTPhotoViewController. There's a good example of it in three20 TTCategory sample app.

TTThumbsViewController also uses a photo source, so you won't have to change that much code. Your Photo viewer should extend TTThumbsViewController and implement theTTThumbsViewControllerDelegate delegate functions.

You can load the photo source in your viewDidLoad function:

///////////////////////////////////////////////////////////////////////////////////////////////////
- (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]

抱歉!评论已关闭.