title: When to change cell constraints for automatic cell height for iOS 8?
body: <p>My cell has an image which is part of the component for determining the height of it. It has a constant height constraint defined on the Storyboard and an outlet to it on the code.</p>
  
  <p>I am trying to use iOS 8's automatic height.</p>
  
  <p>On <code>viewDidLoad</code> I have this line: <code>self.tableView.rowHeight = UITableViewAutomaticDimension</code>.</p>
  
  <p>A have also implemented the <code>tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath)</code> method on the delegate.</p>
  
  <p>The problem is I want to update the height constant when setting up the cell for display, but this doesn't seem to work because its height has already been calculated at this point. So I get this error on the log:</p>
  
  <pre><code>(
      "&lt;NSLayoutConstraint:0x7faed0854440 V:[winninapp.ScoreView:0x7faed08574d0(6)]&gt;",
      "&lt;NSLayoutConstraint:0x7faed085b020 V:[UIImageView:0x7faed085ae10(211)]&gt;",
      "&lt;NSLayoutConstraint:0x7faed0866700 V:|-(0)-[app.ScoreView:0x7faed08574d0]   (Names: '|':UITableViewCellContentView:0x7faed085cf90 )&gt;",
      "&lt;NSLayoutConstraint:0x7faed08667f0 V:[app.ScoreView:0x7faed08574d0]-(0)-[UIView:0x7faed085e180]&gt;",
      "&lt;NSLayoutConstraint:0x7faed0866890 V:[UIImageView:0x7faed085ae10]-(0)-|   (Names: '|':UITableViewCellContentView:0x7faed085cf90 )&gt;",
      "&lt;NSLayoutConstraint:0x7faed08668e0 V:[UIView:0x7faed085e180]-(0)-[UIImageView:0x7faed085ae10]&gt;",
      "&lt;NSLayoutConstraint:0x7faed0867d50 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7faed085cf90(44)]&gt;"
  )
  </code></pre>
  
  <p>What's the correct place to update the height constant for the cell? </p>
  
  <p>I have tried calling these methods after updating the constant, but with no luck:</p>
  
  <pre><code>setNeedsUpdateConstraints()
  setNeedsLayout()
  layoutIfNeeded()
  </code></pre>