title: Update tableview cell height after updating image height constraint
body: <p>I have tableview cell like this.</p>
  
  <p><a href="https://i.stack.imgur.com/DeHms.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DeHms.png" alt="enter image description here"></a></p>
  
  <p>And I update that image height constraint and reload. I am using auto-resizing cell and testing on iOS 10. </p>
  
  <p><a href="https://stackoverflow.com/questions/27058649/how-to-animate-uitableviewcell-height-using-auto-layout">How to animate UITableViewCell height using auto-layout?</a></p>
  
  <pre><code>imageHeightConstraint.constant = 200 //example only. it will be dynamic. Some image height will be 200, 400, etc
  self.contentView.layoutIfNeeded()
  UIView.setAnimationsEnabled(false)
  self.delegate?.getTableView!().beginUpdates()
  self.delegate?.getTableView!().endUpdates()
  UIView.setAnimationsEnabled(true)
  </code></pre>
  
  <p>I tried to reload only 1 row too and not okay.</p>
  
  <pre><code>self.contentView.layoutIfNeeded()
  let indexPath = IndexPath(item: self.tag, section: 0)
  self.delegate?.getTableView!().beginUpdates()
  self.delegate?.getTableView!().reloadRows(at: [indexPath], with: .none)
  self.delegate?.getTableView!().endUpdates()
  </code></pre>
  
  <p>Problem is it doesn't change height at all unless I reload table like this. </p>
  
  <pre><code>imageHeightConstraint.constant = 200
  self.delegate?.getTableView!().reloadData()
  </code></pre>
  
  <p>But I don't want to call reloadData since it will reload all visible cell and resource intensive (laggy too when user scroll quickly). How shall I update my image constraint properly and update table view cell (auto-resizing) height correctly? </p>
  
  <p>Edit - Using with intrinsic size</p>
  
  <p>I delete my height constraint and just use property of intrinsic size in UIImageview. Then height is correct but width is too big (since it is intrinsic). How shall I do?</p>
  
  <p><a href="https://i.stack.imgur.com/tlAFa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tlAFa.png" alt="enter image description here"></a> </p>