2009-12-22 142 views

回答

3

如果您使用的TTThumbsViewController,你必须编辑这个文件。

kThumbSize更改为所需的大小,并将kThumbnailRowHeight更改为该值+4(用于填充)。

然后,在tableView:cell:willAppearAtIndexPath:,设为:

thumbsCell.thumbSize = kThumbSize; 

使拇指知道是什么尺寸。

+0

谢谢!工作很好 – john 2009-12-22 21:14:57

1

另一种方法是创建一个类别TTThumbsDataSource 将以下代码复制到文件ThumbnailDataSource.m中并创建一个类似的头文件。 将头文件包含在您的TTThumbsViewController子类中。将kThumbSize设置为所需的大小。

#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