title: Drawing a circle in iOS
body: <p>Trying to draw circles (well pinpoints as stars) onto a black background. Searched through Stack but none of the other solutions are working.</p>
  
  <p>Trying to use;</p>
  
  <pre><code>CGContextRef contextRef = UIGraphicsGetCurrentContext();
  CGContextFillEllipseInRect(contextRef, CGRectMake(100, 100, 5, 5));
  CGContextSetRGBFillColor(contextRef, 0, 0, 0, 1.0);  
  </code></pre>
  
  <p>The circles are not appearing and the following error message is appearing in the log:</p>
  
  <blockquote>
    <p>&lt;Error&gt;: CGContextSetRGBFillColor: invalid context 0x0.
    This is a serious error. This application, or a library it uses, is
    using an invalid context  and is thereby contributing to an overall
    degradation of system stability and reliability. This notice is a
    courtesy: please fix this problem. It will become a fatal error in an
    upcoming update.</p>
  </blockquote>
  
  <p>Any help to solve this (even completely different/easier way to achieve my goal) would be greatly appreciated.</p>