Permalink
Browse files

Merge branch 'subtext-item-grouped-table-bug' of https://github.com/m…

…morearty/three20 into mmorearty-subtext-item-grouped-table-bug_gh381
  • Loading branch information...
2 parents e44aab5 + 1683751 commit da155155accd1ab2edb0f87a4215aaecdb8e8ff7 @jwang jwang committed Mar 7, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/Three20UI/Sources/TTTableSubtextItemCell.m
@@ -17,7 +17,8 @@
#import "Three20UI/TTTableSubtextItemCell.h"
// UI
-#import "Three20UI/TTTableCaptionItem.h"
+#import "Three20UI/TTTableSubtextItem.h"
+#import "Three20UI/UITableViewAdditions.h"
#import "Three20UI/UIViewAdditions.h"
// Style
@@ -60,9 +61,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)ident
///////////////////////////////////////////////////////////////////////////////////////////////////
+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object {
- TTTableCaptionItem* item = object;
+ TTTableSubtextItem* item = object;
- CGFloat width = tableView.width - kTableCellHPadding*2;
+ CGFloat width = tableView.width - [tableView tableCellMargin]*2 - kTableCellHPadding*2;
CGSize detailTextSize = [item.text sizeWithFont:TTSTYLEVAR(tableFont)
constrainedToSize:CGSizeMake(width, CGFLOAT_MAX)
@@ -120,7 +121,7 @@ - (void)setObject:(id)object {
if (_item != object) {
[super setObject:object];
- TTTableCaptionItem* item = object;
+ TTTableSubtextItem* item = object;
self.textLabel.text = item.caption;
self.detailTextLabel.text = item.text;
}

0 comments on commit da15515

Please sign in to comment.