title: Unsatisfiable constraints with NSTableView when calling reloadData
body: <p>I have a view-based NSTableView with the table view's NSTableCellView's setup graphically through interface builder in the latest version of Xcode on 10.8.2.</p>
  
  <p>When I call -reloadData on the NSTableView, it crashes with:</p>
  
  <pre><code>Unable to simultaneously satisfy constraints:
  (
      "&lt;NSAutoresizingMaskLayoutConstraint:0x105cb8bf0 h=--&amp; v=--&amp; V:[NSTableRowView:0x105ca7020(0)]&gt;",
      "&lt;NSAutoresizingMaskLayoutConstraint:0x10596aa30 h=--&amp; v=-&amp;- V:[GroupTableRowView]-(2)-|   (Names: GroupTableRowView:0x100185860, '|':NSTableRowView:0x105ca7020 )&gt;",
      "&lt;NSAutoresizingMaskLayoutConstraint:0x1058d9770 h=--&amp; v=-&amp;- V:|-(1)-[GroupTableRowView]   (Names: GroupTableRowView:0x100185860, '|':NSTableRowView:0x105ca7020 )&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSAutoresizingMaskLayoutConstraint:0x10596aa30 h=--&amp; v=-&amp;- V:[GroupTableRowView]-(2)-|   (Names: GroupTableRowView:0x100185860, '|':NSTableRowView:0x105ca7020 )&gt;
  </code></pre>
  
  <p>I can't turn off auto-resizing mask translation on any of the views involved as their constraints are managed by the NSTableView. It's clear that the constraints are conflicting because the NSTableRowView can't possibly have a 0 height while still satisfying the other two constraints on the GroupTableRowView that specify mandatory padding between the superview (the row view?). I'm not sure how to resolve this, any insights would be greatly appreciated. Thanks!</p>
  
  <p><strong>Update</strong>:
  I found a workaround. The issue is that for some reason the NSTableRowView was being sent a frame size of <code>{0, 0}</code> when calling -reloadData on the table view. I overrode <code>-setFrameSize:</code> in the NSTableRowView subclass and only pass the message up the responder chain when the size is not <code>{0,0}</code>.</p>
  
  <pre><code>- (void)setFrameSize:(NSSize)newSize
  {
      if (!NSEqualSizes(newSize, NSZeroSize))
          [super setFrameSize:newSize];
  }
  </code></pre>
  
  <p>To use the subclass, implement NSTableViewDelegate's <a href="http://developer.apple.com/library/mac/#documentation/cocoa/reference/NSTableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSTableViewDelegate/tableView%3arowViewForRow%3a" rel="nofollow">-tableView:rowViewForRow:</a> method to return an instance of the custom subclass.</p>
  
  <pre><code>- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row
  {
      id rowView = [[GroupTableRowView alloc] init];
      // configure any custom properties
      return rowView;
  }
  </code></pre>
  
  <p>If the table view is designed entirely in IB, you can simply drag a new NSView into your table view and set it's custom class to your NSTableRowView subclass and change it's User Interface Item Identifier to <code>NSTableViewRowViewKey</code></p>