title: Animation with constraints in UITableViewCell launches incorrectly
body: <p>I am running into an issue where I animate the size of a simple UIView in a table cell by adjusting an autolayout constraint.</p>
  
  <p>When I launch the table for the first time, everything is broken. </p>
  
  <p><a href="https://i.stack.imgur.com/MQy7H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQy7H.png" alt="enter image description here"></a></p>
  
  <p>If I reload the table, it works beautifully. </p>
  
  <p><a href="https://i.stack.imgur.com/ffGe7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ffGe7.png" alt="enter image description here"></a></p>
  
  <p>It's a single view controller with only a few lines of code. Please download this <a href="https://github.com/dstarsboy/AutoLayoutTableCellIssue" rel="nofollow noreferrer">demo project</a> to see it in action.</p>
  
  <p>Here's my code in my whole UIViewController:</p>
  
  <pre><code>import UIKit
  
  class TableCell: UITableViewCell {
      @IBOutlet weak var constraintRedBarWidth: NSLayoutConstraint!
      @IBOutlet weak var labelTitle: UILabel!
      @IBOutlet weak var viewBarArea: UIView!
      @IBOutlet weak var viewRedBar: UIView!
  }
  
  class ViewController: UIViewController {
      @IBOutlet weak var tableView: UITableView!
      var tableData : [CGFloat] = [1, 0.90, 0.70, 0.80,0.50] //percentages
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
      @IBAction func btnReloadTable(sender: AnyObject) {
          tableView.reloadData()
      }
  
  }
  
  extension ViewController: UITableViewDelegate, UITableViewDataSource {
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return tableData.count
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("TableCell") as! TableCell
          cell.labelTitle.text = "Item \(indexPath.row + 1)"
          cell.constraintRedBarWidth.constant = 1
          cell.layoutIfNeeded()
          cell.constraintRedBarWidth.constant = cell.viewBarArea.frame.width * tableData[indexPath.row]
          UIView.animateWithDuration(0.5, animations: {
              cell.layoutIfNeeded()
          })
          return cell
      }
  
  }
  </code></pre>
  
  <p>viewBarArea is just the parent view of the red view and simply represents the possible max size of the bar.</p>