您将不得不创建TTTableSubtitleItemCell的自定义子类并调整图像视图的框架。
创建一个子类TTTableSubtitleItemCell类,命名TableCustomSubtitleItem,并在你的类中添加一个新的布局子视图功能:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)layoutSubviews {
[super layoutSubviews];
if (_imageView2) {
_imageView2.frame = CGRectMake(0, 0, 100, 100);
}
}
在您的数据源,您需要使用您的新TTTableItemCell而不是默认的TTTableSubtitleItemCell的:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (Class)tableView:(UITableView*)tableView cellClassForObject:(id) object {
if ([object isKindOfClass:[TTTableSubtitleItem class]]) {
return [TableCustomSubtitleItem class];
} else {
return [super tableView:tableView cellClassForObject:object];
}
}