1

three20 フレームワークの TTThumbsViewController でグリッド上の画像のサイズを大きくする方法があるかどうかは誰にもわかりませんか?

ありがとう

4

2 に答える 2

3

を使用している場合はTTThumbsViewController、そのファイルを編集する必要があります。

kThumbSizeを必要なサイズに変更し、kThumbnailRowHeightその値 +4 (パディング用) に変更します。

次に、 でtableView:cell:willAppearAtIndexPath:次のように設定します。

 thumbsCell.thumbSize = kThumbSize;

親指はどのサイズにするかを知っています。

于 2009-12-22T19:10:59.507 に答える
1

もう 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
于 2010-10-26T07:42:06.243 に答える