title: Table cell last line being cutoff when resizing using NSString sizeWithFont:constrainedToSize:lineBreakMode:
body: <p>When using the following code to re-size a table row the last line of text is always cutoff, no matter how many lines there are. But there is white space added that looks like enough space for the text.</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];
      CGFloat restOfTheCellHeight = tableView.rowHeight - cell.detailTextLabel.frame.size.height;
      CGSize constrainedSize = CGSizeMake(cell.detailTextLabel.frame.size.width, CGFLOAT_MAX);
      CGSize textHeight = [cell.detailTextLabel.text sizeWithFont:cell.detailTextLabel.font constrainedToSize:constrainedSize lineBreakMode:cell.detailTextLabel.lineBreakMode];
      CGFloat newCellHeight = (textHeight.height + restOfTheCellHeight);
      if (tableView.rowHeight &gt; newCellHeight) {
          newCellHeight = tableView.rowHeight;
      }
      return newCellHeight;
  }
  </code></pre>
  
  <p>Here is the code in cellForRowAtIndexPath:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      CustomCellTableRowTypeSingleLineValueSmallLabel *cell = (CustomCellTableRowTypeSingleLineValueSmallLabel *)[tableView dequeueReusableCellWithIdentifier:@"CellTypeMultiLineLabelInCellSmallCell"];
  
      if (cell == nil) {
          NSArray *xibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCellTableRowTypeSingleLine" owner:nil options:nil];
          for(id currentObject in xibObjects) {
              if([currentObject isKindOfClass:[CustomCellTableRowTypeSingleLineValueSmallLabel class]]){
                  cell = (CustomCellTableRowTypeSingleLineValueSmallLabel *)currentObject;
              }
          }
          cell.accessoryType = UITableViewCellAccessoryNone;
          cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
      }   
  
      cell.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap;
      cell.detailTextLabel.numberOfLines = 0;
  
      cell.detailTextLabel.text = self.attributeStringValue;
      cell.textLabel.text = self.rowLabel;
  
      return cell;
  }
  </code></pre>
  
  <p>Any ideas?</p>