title: Why self.frame and self.contentView.frame often differs for UITableViewCell?
body: <p>I sprinkled</p>
  
  <pre><code>NSAssert(abs(self.frame.size.height-self.contentView.frame.size.height)&lt;=1,@"Should be the same");
  </code></pre>
  
  <p>on various places when creating a UITableViewCell to return.</p>
  
  <p>The result often differs. Sometimes by 1 pixel, sometimes by 2.</p>
  
  <p>I wonder what's the problem is? Is there someting in cellForRowAtIndexPath that makes them different?</p>
  
  <p>They start of the same. There is no editing, etc.</p>
  
  <p>Look at this simple snipet</p>
  
  <pre><code>BGDetailTableViewCell * cell= (BGDetailTableViewCell*)[tableView dequeueReusableCellWithIdentifier:[BGDetailTableViewCell reuseIdentifier]];
  
  if (cell==nil)
  {
      cell = [[BGDetailTableViewCell alloc]init];
  }
  else
  {
      NSAssert(abs(cell.frame.size.height-cell.contentView.frame.size.height)&lt;=1,@"Should be the same"); //Sometimes this fail
  }
  
  NSOrderedSet *Reviews = [self.businessDetailed mutableOrderedSetValueForKey:footer.relationshipKey];
  Review * theReview = [Reviews objectAtIndex:row];
  cell.theReview = theReview;
  NSAssert(abs(cell.frame.size.height-cell.contentView.frame.size.height)&lt;=1,@"Should be the same");//This one never fail right before returning cell
  return cell;
  
  
  
  `NSAssert(abs(cell.frame.size.height-cell.contentView.frame.size.height)&lt;=1,@"Should be the same")`; never fails right before returning the cell.
  </code></pre>
  
  <p>However, it fails after I dequeue the cell sometimes latter.</p>
  
  <p>This is the result</p>
  
  <pre><code>(lldb) po cell
  $0 = 0x0c0f0ae0 &lt;BGDetailTableViewCell: 0xc0f0ae0; baseClass = UITableViewCell; frame = (0 424; 320 91); hidden = YES; autoresize = W; userInteractionEnabled = NO; layer = &lt;CALayer: 0xc01e800&gt;&gt;
  (lldb) po cell.contentView
  $1 = 0x0c086080 &lt;UITableViewCellContentView: 0xc086080; frame = (10 1; 300 89); gestureRecognizers = &lt;NSArray: 0xc0c7ee0&gt;; layer = &lt;CALayer: 0xc0ebbf0&gt;&gt;
  </code></pre>
  
  <p>By the way the tableView is in grouped mode. I think that has something to do with it.</p>