title: Draw a simple circle uiimage
body: <p>I try to make a 20x20 UIImage with a simple blue circle.
  I try with this function, but the result is a blue circle in a black square.
  How do I remove the black square around the circle?</p>
  
  <p>Function:</p>
  
  <pre><code>+ (UIImage *)blueCircle {
      static UIImage *blueCircle = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&amp;onceToken, ^{
          UIGraphicsBeginImageContextWithOptions(CGSizeMake(20.f, 20.f), YES, 0.0f);
          CGContextRef ctx = UIGraphicsGetCurrentContext();
          CGContextSaveGState(ctx);
  
          CGRect rect = CGRectMake(0, 0, 20, 20);
          CGContextSetFillColorWithColor(ctx, [UIColor cyanColor].CGColor);
          CGContextFillEllipseInRect(ctx, rect);
  
          CGContextRestoreGState(ctx);
          blueCircle = UIGraphicsGetImageFromCurrentImageContext();
          UIGraphicsEndImageContext();
  
      });
      return blueCircle;
  }
  </code></pre>
  
  <p>actual result:
  <img src="https://i.stack.imgur.com/uXSwB.png" alt="enter image description here"></p>