title: How draw a line between 2 CGPoint?
body: <p>I have this code</p>
  
  <pre><code>CGPoint one = [button center];
  CGPoint two = [button center];
  </code></pre>
  
  <p>How draw a line at this points? thanks </p>
  
  <p><strong>I try this</strong></p>
  
  <pre><code>CGContextRef ctx = UIGraphicsGetCurrentContext();
  
  
  
  CGContextMoveToPoint(ctx, one.x, one.y);
  CGContextAddLineToPoint(ctx, two.x, two.y);
  CGContextStrokePath(ctx);
  </code></pre>
  
  <p><strong>But i have this error:</strong></p>
  
  <pre><code>&lt;Error&gt;: CGContextDrawPath: invalid context 0x0
  </code></pre>