title: How to draw over a subview of NSView
body: <p>I'm trying to draw at the top of my <code>NSView</code> which has some subviews. 
  In fact I'm trying to reproduce the connection line style of Interface Builder. Here is the code I'm using for the moment:</p>
  
  <pre><code>- (void)drawRect:(CGRect)dirtyRect 
  {
      // Background color
      [[NSColor whiteColor] setFill];
      NSRectFill(dirtyRect);
  
      // Draw line
      if(_connecting)
      {
          CGContextRef c = [[NSGraphicsContext currentContext] graphicsPort];
          [[NSColor redColor] setStroke];
  
          CGContextMoveToPoint(c, _start.x, _start.y);
          CGContextAddLineToPoint(c, _end.x, _end.y);        
          CGContextSetLineWidth(c, LINE_WIDTH); 
          CGContextClosePath(c);
          CGContextStrokePath(c);
      }
  }
  </code></pre>
  
  <p>The first part is to color my <code>NSView</code> (if you know an other way, tell me please 'cause I come from iPhone development and I miss the <code>backgroundColor</code> property of <code>UIView</code>)</p>
  
  <p>Then if a connection if detected, I draw it with 2 <code>NSPoint</code>s. This code works but I didn't get it to draw over subviews, only on the first <code>NSView</code>.</p>