당신은 TTTableSubtitleItemCell의 사용자 지정 하위 클래스를 생성하고 이미지 뷰의 프레임을 조정해야합니다.
는 TableCustomSubtitleItem라는 이름의 서브 클래스 TTTableSubtitleItemCell 클래스를 생성하고 클래스에 새로운 레이아웃 파단 기능을 추가, 기본 TTTableSubtitleItemCell 대신 새 TTTableItemCell을 사용할 필요가 데이터 소스에서
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)layoutSubviews {
[super layoutSubviews];
if (_imageView2) {
_imageView2.frame = CGRectMake(0, 0, 100, 100);
}
}
:
를
///////////////////////////////////////////////////////////////////////////////////////////////////
- (Class)tableView:(UITableView*)tableView cellClassForObject:(id) object {
if ([object isKindOfClass:[TTTableSubtitleItem class]]) {
return [TableCustomSubtitleItem class];
} else {
return [super tableView:tableView cellClassForObject:object];
}
}