Skip to content

Instantly share code, notes, and snippets.

@akozlik
Created March 14, 2014 19:45
Show Gist options
  • Save akozlik/9555349 to your computer and use it in GitHub Desktop.
Save akozlik/9555349 to your computer and use it in GitHub Desktop.
Dynamic Cell Height w/AutoLayout
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
static UITableViewCell *cell;
if (cell == nil) {
cell = [tableView dequeueReusableCellWithIdentifier:@"ClueCell"];
}
[self configureCell:cell forIndexPath:indexPath];
return [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + 1.0f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment