title: UITableView cell gets cut off in edit mode
body: <p>Basically I have a table view with an array of files from a documents folder. So far I have managed to adjust the height of the cell depending on how big the text label is as so:</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
      float height = 30;// y value of dataLabel
      CGRect labelRect = [[directoryContents objectAtIndex:indexPath.row]
                          boundingRectWithSize:CGSizeMake(tableView.frame.size.width-15, 0)
                          options:NSStringDrawingUsesLineFragmentOrigin
                          attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15]}
                          context:nil];
  
      height=height+labelRect.size.height+30;
      return height;
  }
  </code></pre>
  
  <p>If the cell.textLabel starts off as 1 line or 2 lines it's fine and shows accordingly. However, when I tap the edit button in my nav bar to bring up edit mode, if the cell.textLabel was once 1 line and drops to 2 lines because of the shrinking space, the cell won't adjust and it gets clipped by the cell border.</p>
  
  <p>How an I prevent this from happening? </p>
  
  <p>UPDATED with images:</p>
  
  <p><a href="https://i.stack.imgur.com/EIHJP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EIHJP.png" alt="Before"></a>
  <a href="https://i.stack.imgur.com/xtkas.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xtkas.png" alt="After edit mode"></a></p>
  
  <p>With being called:</p>
  
  <pre><code>- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
      [super setEditing:editing animated:animated];
  
      [self.tableView beginUpdates];
      [self.tableView endUpdates];
  }
  </code></pre>
  
  <p>Any help would be appreciated. Thank You.</p>