title: UIGraphicsGetCurrentContext(): Should we put CGContext as function parameter
body: <p>I'm using <code>Core Graphic</code> library for drawing on <code>UIView</code> under method <code>drawRect</code>. As we know, under this method, we firstly get context by:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect {
     CGContextRef context = UIGraphicsGetCurrentContext();
  }
  </code></pre>
  
  <p>I often use helper method for drawing. So, in helper method, should I put this context as parameter. For example:</p>
  
  <pre><code>- drawCircle:(CGContextRef)context center:(int)center radius:(int)radius {
  // drawing here
  } 
  </code></pre>
  
  <p>Or we can get context variable later in helper function:</p>
  
  <pre><code>- drawCircle: center:(int)center radius:(int)radius {
  CGContextRef context = UIGraphicsGetCurrentContext();
  // drawing here
  }
  </code></pre>
  
  <p>I have tested and often don't see any problems. But I'm afraid, when I'm calling another method, something changes and <code>UIGraphicsGetCurrentContext()</code> will return different context variable. So is it safe to do in second way ? Because it will make my code clearer. And if wrong, please tell me will be wrong under what circumstance ?</p>
  
  <p>Thanks :)</p>