title: Simple drawing with Quartz - Core Graphics
body: <p>I want to draw a rectangle with the top-left corner rounded with 3 sub-spaces in it. Something like this:</p>
  
  <pre><code> _______
  |_|_____|
  |       |
  |_______|
  </code></pre>
  
  <p>But for some reason I cannot get the inner two lines drawn. </p>
  
  <pre><code>- (void) drawRect:(CGRect)rect{
  CGContextRef context = UIGraphicsGetCurrentContext();
  float cornerRadius = 25.0;
  float w = self.bounds.size.width;
  float h = self.bounds.size.height;
  CGContextMoveToPoint(context, cornerRadius, 0);
  CGContextAddQuadCurveToPoint(context, 0, 0, 0, cornerRadius);
  CGContextAddLineToPoint(context, 0, h);
  CGContextAddLineToPoint(context, w, h);
  CGContextAddLineToPoint(context, w, 0);
  CGContextAddLineToPoint(context, cornerRadius, 0);
  
  //drawing settings
  CGContextSetLineWidth(context, 0.5);
  CGContextSetStrokeColorWithColor(context, [UIColor blackColor].CGColor);
  CGContextSetFillColorWithColor(context, [UIColor white].CGColor); 
  
  //draw rectangle
  CGContextDrawPath(context, kCGPathFillStroke);
  
  //draw title/label partition
  CGContextMoveToPoint(context, TITLE_HEIGHT, 0);
  CGContextAddLineToPoint(context, TITLE_HEIGHT, TITLE_HEIGHT);
  CGContextStrokePath(context);
  
  //draw title/content partition
  CGContextMoveToPoint(context, 0, TITLE_HEIGHT);
  CGContextAddLineToPoint(context, self.bounds.size.width, TITLE_HEIGHT);
  CGContextStrokePath(context);
  }
  </code></pre>
  
  <p>I wonder what am I mistaking here... ;(</p>
  
  <p>Thanks in advance</p>