title: How to manage height cell dynamically with TdBadgedCell in iOS apps?
body: <p>i've implemented, in my iOS ap, some TdBadgedCell (from <a href="https://github.com/tmdvs/TDBadgedCell" rel="nofollow">https://github.com/tmdvs/TDBadgedCell</a>) in a UITabView. But when I want to manage the cells' hight dynamically by using something like this example:</p>
  
  <pre><code>    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  {
    NSString *text = [items objectAtIndex:[indexPath row]];
  
    CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f);
  
    CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
  
    CGFloat height = MAX(size.height, 44.0f);
  
    return height + (CELL_CONTENT_MARGIN * 2);
  }
  </code></pre>
  
  <p>the cell's width is the entire width of the cell (calculated variable "constraint" in the example below) and not the real width of the label printed on screen taking consideration of the badge's width. So, the portion of text at the end of the UILabel doesn't appear in cell when the text in too long.</p>
  
  <p>How can I resolve this please?</p>