title: UITableView dynamic cell height conflict - height NOT depending on a label
body: <p>So, my table view displays images. Every cell is basically an image filling out the cells entire <code>contentView</code>. As the images come with different aspect ratios, I need my cells to be adjusting their height depending on the table views width and the aspect ratio of the image. I've followed <a href="https://www.raywenderlich.com/87975/dynamic-table-view-cell-height-ios-8-swift" rel="noreferrer">this Ray Wenderlich</a> tutorial but now get a constraint conflict. The image is resized by altering the <code>imageView</code>s height constraint e.g. <code>myImageViewHeight.constant = tableView.frame.width / aspectRatio</code></p>
  
  <pre><code>2016-06-16 13:56:25.823 MyApp[92709:5649464] Unable to simultaneously satisfy constraints.
  Probably at least one of the constraints in the following list is one you don't want. 
  Try this: 
      (1) look at each constraint and try to figure out which you don't expect; 
      (2) find the code that added the unwanted constraint or constraints and fix it. 
  (
  "&lt;NSLayoutConstraint:0x7fbcdaf5c190 V:[UIImageView:0x7fbcdaf5c300(303)]&gt;",
  "&lt;NSLayoutConstraint:0x7fbcdaf5b460 V:|-(0)-[UIImageView:0x7fbcdaf5c300]   (Names: '|':UITableViewCellContentView:0x7fbcdaf52230 )&gt;",
  "&lt;NSLayoutConstraint:0x7fbcdaf5b4b0 V:[UIImageView:0x7fbcdaf5c300]-(0)-|   (Names: '|':UITableViewCellContentView:0x7fbcdaf52230 )&gt;",
  "&lt;NSLayoutConstraint:0x7fbcdaf5e550 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fbcdaf52230(100)]&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x7fbcdaf5c190 V:[UIImageView:0x7fbcdaf5c300(303)]&gt;
  </code></pre>
  
  <p>The image view has the following constraints and has the cells <code>contentView</code> as superview. </p>
  
  <p><a href="https://i.stack.imgur.com/5jYpq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5jYpq.png" alt="Constraints"></a></p>
  
  <p>In the table view controller class, I'm using</p>
  
  <pre><code>self.tableView.estimatedRowHeight = 80
  self.tableView.rowHeight = UITableViewAutomaticDimension
  </code></pre>
  
  <p>I've also tried this - same result. </p>
  
  <pre><code>func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  
  func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  </code></pre>
  
  <p>I'm guessing that I have to get rid of the <code>'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fbcdaf52230(100)]&gt;"</code> but how? Also, does anybody know some kind of documentation/tutorials on how to properly create table views with dynamic content that <strong>not only</strong> cover having a bunch of labels inside the cell? My code <strong>works</strong> just fine if the image view is replaced by a label...  </p>