title: How to Override NSScrollView's -tile When Using AutoLayout
body: <h2>What I'm Doing</h2>
  
  <p>I have an NSScrollView subclass. In it, I override the <code>tile</code> method to drop the contentView's frame height by 1 so that I can do some custom drawing of a top border (as explained here: <a href="https://stackoverflow.com/questions/30526671/nsscrollview-fade-in-a-top-border-like-messages-app">NSScrollView: fade in a top-border like Messages.app</a>)</p>
  
  <pre>
  - (void) tile
  {
      id contentView = [self contentView];
      [super tile];
  
      NSRect newRect = [contentView frame];
      newRect.size.height -= 1.0f;
      newRect.origin.y += 1.0f;
      [contentView setFrame:newRect];
  }
  </pre>
  
  <p>When AutoLayout is enabled, I get this message:</p>
  
  <blockquote>
    <p>Layout still needs update after calling -[LPAutoBorderScrollView layout].  LPAutoBorderScrollView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it.  Both are programming errors in Cocoa Autolayout.  The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed.</p>
  </blockquote>
  
  <p>And the scrollView will not scroll properly. Attempting to do so causes a bit of flickering (as if the clipView is moving its content slightly and then snapping it back) </p>
  
  <h2>The Issue</h2>
  
  <p>Obviously, <code>[super tile]</code> is triggering <code>layout</code> and my subsequent modification to the <code>contentView</code> frame qualifies as "dirtying the layout in the middle of updating it". </p>
  
  <p>So, how do I properly take care of this layout issue? </p>
  
  <p>Note: I'm relatively new to AutoLayout. Every year or so I try adopting it and I end up running into headaches like this that force me to abandon it. This time, I'm REALLY making an effort to like the damn thing.</p>