3
다른 높이의 UITableViewCell로 UITableView를 채우려고합니다. 셀의 높이에 의해 사용되고 있음을 (NSIndexPath *) indexPath 다른 높이의 UITableViewCell
것 같습니다 추천했습니다 : (jQuery과 *)있는 tableView heightForRowAtIndexPath : 나는
- (CGFloat)있는 tableView에 적당한 크기를 반환하고 프레임 워크는 어딘가에 있지만 대기열에있는 셀은 여전히 같은 크기입니다.
개별 셀에서도 setFrame :을 사용해 보았지만 여전히 효과가 없습니다. 내가 예를
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (condition 1) return 60; else if (condition 2) return 100; return 44; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"TableViewCell"; TableViewCell *cell = (TableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } return cell; }