Skip to content

Instantly share code, notes, and snippets.

@seivan
Created January 31, 2014 19:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seivan/8741391 to your computer and use it in GitHub Desktop.
Save seivan/8741391 to your computer and use it in GitHub Desktop.
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;{
CGFloat heightForRowAtIndexPath = 44.f;
NSString * cellID = [self cellIdForIndexPath:indexPath];
UITableViewCell <XXApplicationTableViewCellConfiguring> * cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if([cell conformsToProtocol:@protocol(XXApplicationTableViewCellConfiguring)]) {
[cell configureCellWithApplicationModel:self.application];
[cell layoutSubviews];
heightForRowAtIndexPath = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
}
return heightForRowAtIndexPath;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment