title: How is it possible that UITableViewCellContentView height is different from heightForRowAtIndexPath:
body: <p>I'm facing a really weird problem on my UITableView.
  I have some different cells that I want to display on a newsfeed-like table view.</p>
  
  <p>And I have a problem with a cell after reuse.
  The cell contains two images, two labels and a view with the share/like/comment buttons.
  I'm gonna try to draw it, but I'm not sure it's gonna be pretty :</p>
  
  <pre><code>-------------------------------------------------
  |       |   __    ____________________________  |
  |       |  |_2|  |                            | |
  |       |        |              3             | |
  |       |        |                            | |
  |   1   |        |____________________________| |
  |       |                                       |
  |       |_______________________________________|
  |       |                                       |
  |       |                  4                    |
  |_______|_______________________________________|
  |                                               |
  |                       5                       |
  |_______________________________________________|
  
  1 : objectImage
  2 : subjectImage
  3 : titleLabel
  4 : commentLabel
  5 : actionsView
  </code></pre>
  
  <p>And my constraints are :</p>
  
  <pre><code>"H:|-0-[objectImage(60)]-7-[subjectImage(30)]-7-[titleLabel]-7-|"
  "H:|-0-[objectImage(60)]-0-[commentLabel]-0-|"
  "H:|-0-[actionsView]-0-|"
  "V:|-0-[objectImage(&gt;=35)]-0-[actionsView(44)]-0-|"
  "V:|-7-[subjectImage(30)]"
  "V:|-7-[titleLabel(&gt;=46)]-7-[commentLabel(&gt;=35)]-0-[actionsView(44)]-0-|"
  </code></pre>
  
  <p>And every time the cell is drawn, I change this constraint:</p>
  
  <pre><code>"V:[commentLabel(%0.2f)]"
  </code></pre>
  
  <p>The cells display perfectly the first time.</p>
  
  <p>But, the problem I have is that at a point, after some reuse (I can't reproduce it every time) the app crashes because of a constraint problem.
  Here is the exception:</p>
  
  <pre><code>"&lt;NSLayoutConstraint:0x205a75b0 V:[UILabel:0x1ef31430(105)]&gt;",
  "&lt;NSLayoutConstraint:0x1ef34440 V:[UILabel:0x1ef31430]-(0)-[UIView:0x1ef2fe50]&gt;",
  "&lt;NSLayoutConstraint:0x1ef34380 V:[UILabel:0x1ef31250]-(7)-[UILabel:0x1ef31430]&gt;",
  "&lt;NSLayoutConstraint:0x1ef33900 V:|-(7)-[UILabel:0x1ef31250]   (Names: '|':UITableViewCellContentView:0x1ef2bf50 )&gt;",
  "&lt;NSLayoutConstraint:0x1ef34340 V:[UILabel:0x1ef31250(&gt;=46)]&gt;",
  "&lt;NSLayoutConstraint:0x1ef33210 V:[UIView:0x1ef2fe50]-(0)-|   (Names: '|':UITableViewCellContentView:0x1ef2bf50 )&gt;",
  "&lt;NSLayoutConstraint:0x1ef331d0 V:[UIView:0x1ef2fe50(44)]&gt;",
  "&lt;NSAutoresizingMaskLayoutConstraint:0x1ef36f90 h=--&amp; v=--&amp; V:[UITableViewCellContentView:0x1ef2bf50(147)]&gt;"
  
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x1ef34380 V:[UILabel:0x1ef31250]-(7)-[UILabel:0x1ef31430]&gt;
  </code></pre>
  
  <p>The problem is that the constraint [UITableViewCellContentView:0x1ef2bf50(147)] is not right. </p>
  
  <p>What is weird is that the heightForRowAtIndexPath: returns the correct value which is 217.</p>
  
  <p>And what I don't understand is that the height of the UITableViewCell is correct!</p>
  
  <pre><code>(lldb) po 0x1ef2bf50
  $0 = 519225168 &lt;UITableViewCellContentView: 0x1ef2bf50; frame = (0 0; 320 147); gestureRecognizers = &lt;NSArray: 0x1ef30a20&gt;; layer = &lt;CALayer: 0x1ef2a3d0&gt;&gt;
  (lldb) po [0x1ef2bf50 superview]
  $1 = 0x1ef30e40 &lt;NewsSubjectCommentCell: 0x1ef30e40; baseClass = UITableViewCell; frame = (0 1055; 320 217); hidden = YES; autoresize = W; layer = &lt;CALayer: 0x1ef25e10&gt;&gt;
  </code></pre>
  
  <p>So I don't understand how is it possible that the height constraint of UITableViewCellContentView is 147. It is the height of another cell of the same type, but it should be changed to 209, right?</p>
  
  <p>So, if you have any insight on how this can happen (maybe I did something wrong), I'd be glad.</p>
  
  <p>Thanks,</p>