title: UIView drawRect drawing lines of wrong width
body: <p>I'm trying to add a little red line on the bottom of my UIView.</p>
  
  <p>I want the line to be a 1px line.</p>
  
  <p>Can someone tell me why the following code:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect {
  CGContextRef currentContext = UIGraphicsGetCurrentContext();
  CGContextSaveGState(currentContext);
  CGContextSetRGBFillColor(currentContext, 0.0f, 0.0f, 0.0f, 1.0f);
  CGContextFillRect(currentContext, RECT(0, 0, rect.size.width, rect.size.height - 8));
  CGContextSetLineWidth(currentContext, 1);
  CGContextSetRGBStrokeColor(currentContext, 1.0f, 0.0f, 0.0f, 1.0f);
  CGContextBeginPath(currentContext);
  CGContextMoveToPoint(currentContext, 0, rect.size.height - 7);
  CGContextAddLineToPoint(currentContext, rect.size.width, rect.size.height - 7);
  CGContextStrokePath(currentContext);
  CGContextRestoreGState(currentContext);
  }
  </code></pre>
  
  <p>Draws a line that spans 2px in height?</p>