How to start Three20 photo viewer in thumbnail view?

I followed How to use the Three20 photo viewer from Ray Wenderlich , it was very clear and works great, my question is as a name, How do I launch the 3D viewer in thumbnail view?

I am very grateful for any guidance or help.

+8
ios iphone thumbnails three20
source share
1 answer

You should use TTThumbsViewController instead of TTPhotoViewController . There's a good example of this in an example application with three TTCategory examples.

TTThumbsViewController also uses a photo source, so you don’t have to change that code. Your photo viewer should extend the TTThumbsViewController and implement the TTThumbsViewControllerDelegate delegate TTThumbsViewControllerDelegate .

You can load the photo source into the 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] initWithType:PhotoSourceNormal title:@"Select Picture" photos:photos photos2:nil]; } 
+2
source share

All Articles