title: Dynamic label and cell height with show more button action
body: <p>I am trying to implement dynamic label height in a <code>tableViewCell</code> after clicking show more button label needs to set <code>label.numberOfLines = 0</code>.</p>
  
  <p>Then cell height and label height should increase dynamically.</p>
  
  <p>Here is my code below (when <code>tableView</code> reloads the same label height taking for reused cell)</p>
  
  <pre><code> func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
   let cell: UITableViewCell = 
   self.tableView.dequeueReusableCell(withIdentifier: 
   "BTSTableViewCellIdentifier")! 
      cell.configureWithPost(posts[indexPath.row])
      cell.delegate = self
      return cell
     }
  
   func tableView(_ tableView: UITableView, heightForRowAt indexPath: 
    IndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  
  func tableView(_ tableView: UITableView, estimatedHeightForRowAt 
   indexPath: IndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  
  
  func configureWithPost(_ postViewModel: BTSTableCellViewModel) {
      self.postViewModel = postViewModel
      usernameLabel.text = postViewModel.username
      detailtextLabel.numberOfLines = 2
      detailtextLabel.text = postViewModel.textDetail  
  }
  
  @IBAction func showmorePressed(_ sender: Any) {
      detailtextLabel.numberOfLines = 0;
           self.tableView.reload()
  
  }
  </code></pre>