-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 높이;
}
<응용>
 
// 행높이
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 
    if (indexPath.row == timeLineCount-1) {
    return 40;
    } else {
        UIFont *font = [UIFont systemFontOfSize:13];
        CGSize withinSize = CGSizeMake(300, 80);
        CGSize size = [[lastestTweets objectAtIndex:indexPath.row] sizeWithFont:font constrainedToSize:withinSize lineBreakMode:UILineBreakModeWordWrap];
        UIFont *font2 = [UIFont systemFontOfSize:11];
        CGSize withinSize2 = CGSizeMake(300, 80);
        CGSize size2 = [[userAccountName objectAtIndex:indexPath.row] sizeWithFont:font2 constrainedToSize:withinSize2 lineBreakMode:UILineBreakModeWordWrap];
        return (size.height+ size2.height)*2;
    }
}
반응형
    
    
    
  'Programming > iOS - ObjC' 카테고리의 다른 글
| 객체 지정하는 변수 (0) | 2010.11.29 | 
|---|---|
| NSDictionary - 기본 사용법 (0) | 2010.11.29 | 
| NSDictionary - key에 해당되는 value가져오는것 (0) | 2010.11.29 | 
| NSArray - 내용 정렬된 상태로 얻어오기. (0) | 2010.11.26 | 
| UITableView - 각 section에 타이틀 추가 (0) | 2010.11.26 | 
| UITableView - 더보기 버튼 추가 (disclosure) (0) | 2010.11.26 | 
| UITableView - 글자크기 수정 (0) | 2010.11.26 | 
| UITableView - 리스트목록에 하위제목 붙이는 방법 (0) | 2010.11.26 | 
| UITableView - 내용 넣기 (0) | 2010.11.22 | 
| UILabel - Line수 설정 (0) | 2010.11.22 |