Skip to content

Instantly share code, notes, and snippets.

@exce11ent
Created September 26, 2013 16:27
Show Gist options
  • Save exce11ent/6716615 to your computer and use it in GitHub Desktop.
Save exce11ent/6716615 to your computer and use it in GitHub Desktop.
-(CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == SectionNumberInfo)
{
NSString *str = _group.groupDescription;
CGSize labelSize = [str sizeWithFont:[UIFont fontWithName:@"Helvetica" size:17] constrainedToSize:CGSizeMake(260, 400) lineBreakMode:NSLineBreakByTruncatingTail];
// 112 (logo height) + 13(logo to margin) + 8(logo bottom margin) + 40(label bottom margin) = 173
CGFloat result = 173 + labelSize.height;
return result;
}
else return 60.;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment