title: IOS - Drawing rounded corner square
body: <p>I am trying to create a 200px square with rounded corners to use as an IOS toast style indication.</p>
  
  <p>I have the following so far - </p>
  
  <pre><code>- (void)drawRect:(CGRect)rect {
  
      CGContextRef context = UIGraphicsGetCurrentContext();
      CGContextSetFillColorWithColor(context, [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.1].CGColor);
      CGContextMoveToPoint(context, 10, 0);
      CGContextAddLineToPoint(context, 95, 0);
      CGContextAddArcToPoint(context, 100, 0, 100, 5, 10);
      CGContextAddLineToPoint(context, 100, 95);
      CGContextAddArcToPoint(context, 100, 100, 95, 100, 10);
      CGContextAddLineToPoint(context, 5, 100);
      CGContextAddArcToPoint(context, 0, 100, 0, 95, 10);
      CGContextAddLineToPoint(context, 0, 5);
      CGContextAddArcToPoint(context, 0, 0, 5, 0, 10);
      CGContextFillPath(context);
  }
  </code></pre>
  
  <p>I got this far by following a tutorial - it draws a perfect 100px with rounded corners square - but I need a 150px square!  I have changed every setting imaginable - with some bizzare results - but cant work out how the width height is defined!?  Can anyone advise?</p>