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]; }
aporat
source share