1

Does anybody know if there is a way to increase the size of the images on the grid in a TTThumbsViewController in the three20 framework?

Thanks

4

2 回答 2

3

If you're using the TTThumbsViewController, you'll have to edit that file.

Change the kThumbSize to the size you want, and kThumbnailRowHeight to that value+4 (for the padding).

Then, in tableView:cell:willAppearAtIndexPath:, set:

 thumbsCell.thumbSize = kThumbSize;

so the thumbs know what size to be.

于 2009-12-22T19:10:59.507 回答
1

Another way is to create a category of TTThumbsDataSource Copy the code below into a file ThumbnailDataSource.m and create a similiar headerfile. Include the header file in your TTThumbsViewController subclass. Set kThumbSize to the size you want.

#import <Three20/Three20.h>

@implementation TTThumbsDataSource(ThumbnailDataSource)
- (void)        tableView: (UITableView*)tableView
                     cell: (UITableViewCell*)cell
    willAppearAtIndexPath: (NSIndexPath*)indexPath {
    if ([cell isKindOfClass:[TTThumbsTableViewCell class]]) {
        TTThumbsTableViewCell* thumbsCell = (TTThumbsTableViewCell*)cell;
        thumbsCell.delegate = _delegate;
        thumbsCell.columnCount = [self columnCount];
        thumbsCell.thumbSize = kThumbSize;
    }
}

@end
于 2010-10-26T07:42:06.243 回答