title: Multiple paths are not kept on screen
body: <p>I have an custom <code>UIView</code>. I keep on the lines and points when the finger touches moves. Then I make points to <code>CGPath</code> with this method：</p>
  
  <pre><code>- (void)makeCGPath
  {
  CGMutablePathRef path = CGPathCreateMutable();
  
  if (lines&amp;&amp; lines.count&gt;0)
  {
      for (int i = 0; i &lt; lines.count; i++)
      {
          CGMutablePathRef linePath = CGPathCreateMutable();
  
          NSArray *tempArray = [lines objectAtIndex:i];
          CGPoint p = [[tempArray objectAtIndex:0]CGPointValue];
          CGPathMoveToPoint(linePath, NULL, p.x, p.y);
          for (int j = 1; j &lt; tempArray.count; j++)
          {
              p = [[tempArray objectAtIndex:j]CGPointValue];
              CGPathAddLineToPoint(linePath, NULL, p.x, p.y);
          }
          CGPathAddPath(path, NULL, linePath);
          CGPathRelease(linePath);
  
  
  
      }
  }
  if (points&amp;&amp; points.count &gt; 0)
  {
      CGMutablePathRef pointPath = CGPathCreateMutable();
      CGPoint p = [[points objectAtIndex:0]CGPointValue];
      CGPathMoveToPoint(pointPath, NULL, p.x, p.y);
      for (int i = 1; i &lt; points.count;i++ )
      {
          p = [[points objectAtIndex:i]CGPointValue];
          CGPathAddLineToPoint(pointPath, NULL, p.x, p.y);
      }
      CGPathAddPath(path, NULL, pointPath);
      CGPathRelease(pointPath);
  }
  
  
   drawPath = CGPathCreateCopy(path);
   [self setNeedsDisplay];
  
   [lines removeAllObjects];
   [points removeAllObjects];
  }
  </code></pre>
  
  <p>And my drawRect is look like this follow.</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect
  {
  CGContextRef ctx = UIGraphicsGetCurrentContext();
  CGContextSetLineWidth(ctx, 3);
  [[UIColor blackColor]set];
  CGContextAddPath(ctx, drawPath);
  CGContextStrokePath(ctx);
  }
  </code></pre>
  
  <p>It seems so strange that it displays only the last line on the screen. What's wrong with it?</p>
  
  <p>How can I keep all of these paths on screen?</p>