title: Dynamically increase height of UILabel & TableView Cell?
body: <p>I have a UITableView in which i am displaying a custom cell.I my cell i have two label &amp; one view as below in picture.</p>
  
  <p><a href="https://i.stack.imgur.com/TMR28.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TMR28.png" alt="enter image description here"></a></p>
  
  <p>I have given constraint of left view like this </p>
  
  <p><strong>Item label constraints</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/0Z0S1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0Z0S1.png" alt="enter image description here"></a></p>
  
  <p><strong>center view constraints</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/xYjPO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xYjPO.png" alt="enter image description here"></a></p>
  
  <p><strong>right view constarints</strong></p>
  
  <p><a href="https://i.stack.imgur.com/Fpo8Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Fpo8Q.png" alt="enter image description here"></a>
  <br>I am using a bean class to store data for two labels &amp; add that bean object into one array.I am using below code in heightForRowAtIndexPath.</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      // Calculate a height based on a cell
      if(!self.customCell) {
          self.customCell = [self.tableView dequeueReusableCellWithIdentifier:@"thirdcell"];
      }
  
      // Configure the cell
      Instrument *inst=[arr_instSpecs objectAtIndex:indexPath.row];
      self.customCell.label_item.text=inst.item;
      self.customCell.label_desc.text=inst.desc;
  
  
      // Layout the cell
  
      [self.customCell layoutIfNeeded];
  
      // Get the height for the cell
  
      CGFloat height = [self.customCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
  
      // Padding of 1 point (cell separator)
      CGFloat separatorHeight = 1;
  
      return height + separatorHeight;
  }
  </code></pre>
  
  <p>Problem is neither height of label is increasing nor of table view cell.I have explained everything. I want to make size of label increase  when there is increase in label's text &amp; also when label size increase then height of cell must increase.</p>