title: UILabel height not changing
body: <p>I am trying to change my two labels heights defined in custom cell but failed many times. Height of labels should change with length of text populated in. I have successfully implemented the cell height in <code>heightForRowAtIndexPAth</code>but label height is not adjusting according to cell height. It either truncate the text or shrink the font. <code>SetNumberOfLines</code> to zero seems to have no effect. <code>ContentTextView</code> and <code>TransView</code> are my two <code>uiLabels</code></p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Customcell";
  
      CustomeCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier   forIndexPath:indexPath];
  
      NSString *text = [_detailItem objectAtIndex:[indexPath row]];
      NSString *text2 = [_detailItem2 objectAtIndex:[indexPath row]];
  
  
      CGSize maxSize = CGSizeMake(296.f, FLT_MAX);
      NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:text];
      NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:text2];
  
      CGRect rect = [attributedString boundingRectWithSize:maxSize
                                   options:NSStringDrawingUsesLineFragmentOrigin
                                   context:nil];
      CGRect rect2 = [attributedString2 boundingRectWithSize:maxSize
                                                            options:NSStringDrawingUsesLineFragmentOrigin
                                                   context:nil];
  
  
      CGSize maximumLabelSize = CGSizeMake(500,CGFLOAT_MAX);
      CGSize requiredSize = [cell.contentTextView sizeThatFits:maximumLabelSize];
      CGSize requiredSize2 = [cell.transView sizeThatFits:maximumLabelSize];
      CGRect labelFrame = cell.contentTextView.frame;
      CGRect labelFrame2 = cell.transView.frame;
      labelFrame.size.height = requiredSize.height;
      labelFrame2.size.height=requiredSize2.height;
      cell.contentTextView.frame = labelFrame;
      cell.transView.frame=labelFrame2;
      [attributedString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, [text length])];
      [attributedString2 addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, [text2 length])];
  
      [cell.contentTextView setLineBreakMode:NSLineBreakByWordWrapping];
      [cell.contentTextView setMinimumScaleFactor:FONT_SIZE];
      NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
      [style setLineSpacing:2];
      [style setAlignment:(NSTextAlignment)kCTRightTextAlignment];
      [cell.contentTextView setNumberOfLines:0];
      [ cell.transView setNumberOfLines:0];
  
      cell.selectionStyle = UITableViewCellSelectionStyleBlue;
      tableView.separatorColor = [UIColor colorWithRed:0.576 green:0.796 blue:0.008 alpha:1];
  
      cell.contentTextView.attributedText = attributedString;
      cell.transView.attributedText=attributedString2;
  
      return cell;
  </code></pre>