title: Dynamic TableView Cell Heights Incorrect Until After Scrolling (iOS 8) - full screenshots attached
body: <p><strong>EDIT</strong></p>
  
  <p><em>Built a new sample project from scratch and the dynamic tableview cell height is working flawlessly. I then tried to replicate by trimming down my project to it's bare minimum and it's STILL broken (first few cells buggy). Attaching full project for both working and not working examples. Project/code literally looks 99% identical and for the love of me can't figure out where the 1% difference is. The only thing that is popping out at me is that I used different size classes (wAny hAny vs wCompact hRegular but I can't imagine that would do anything given I'm testing in portrait only</em></p>
  
  <p>Working project:
  <img src="https://i.stack.imgur.com/7gzey.png" alt="enter image description here"></p>
  
  <p>Not working project:
  <img src="https://i.stack.imgur.com/JjKVb.png" alt="enter image description here"></p>
  
  <pre><code>WORKING (new project from scratch):
  https://drive.google.com/file/d/0B_EIkjmOj3ImWXZjVFZMYXZmVGc/view?usp=sharing
  
  NOT WORKING (my project, cleaned up to it's bare minimum)
  https://drive.google.com/file/d/0B_EIkjmOj3ImMGRNOXU2RlNkWEk/view?usp=sharing
  </code></pre>
  
  <hr>
  
  <p>Have scoured the web trying to understand what is going on, but for some reason my cell heights are incorrect until I scroll past the prototype cells.</p>
  
  <p>Upon initial load:
  <img src="https://i.stack.imgur.com/BfE5H.png" alt="enter image description here"></p>
  
  <p>And after scrolling past each cell:
  <img src="https://i.stack.imgur.com/V2box.png" alt="enter image description here"></p>
  
  <p>Background colors:
  <code>
          cell.postTextLabel.backgroundColor = [UIColor orangeColor];
          subView.backgroundColor = [UIColor blueColor];
          contentView.backgroundColor = [UIColor brownColor];
  </code></p>
  
  <p>Not doing anything too fancy here: just a prototype cell, a subview, and three labels (username, timestamp, text).</p>
  
  <p>Below screenshots highlight my constraints in Storyboard:</p>
  
  <p><img src="https://i.stack.imgur.com/I2qDr.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/BmHHN.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Nd9SE.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/tj4vU.png" alt="enter image description here"></p>
  
  <p>I pull data from Parse, and am reloading my data while setting tableView layout</p>
  
  <p><code>
              [self.tableView setNeedsLayout];
              [self.tableView layoutIfNeeded];
              [self.tableView reloadData];
  </code></p>
  
  <p>And lastly my <code>cellForRowAtIndexPath</code> method:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      return [self postCellAtIndexPath:indexPath];
  }
  
  
  - (UITableViewCell *)postCellAtIndexPath:(NSIndexPath *)indexPath {
      static NSString *PostCellIdentifier = @"PostCell";
      PostCell *cell = (PostCell *)[self.tableView dequeueReusableCellWithIdentifier:PostCellIdentifier forIndexPath:indexPath];
  
      [self configurePostCell:cell atIndexPath:indexPath];
  
      [cell setNeedsLayout];
      [cell layoutIfNeeded];
  
      [cell setNeedsUpdateConstraints];
      [cell updateConstraintsIfNeeded];
  
  
  
      return cell;
  }
  </code></pre>