title: iOS: Drawing app - draws circle, but new circle replaces old - save state?
body: <p>so I'm doing this painting application in iOS, and I have a question...</p>
  
  <p>Right now I draw a circle where the user taps... But here's the problem. When the user taps again, the first circle is moved to the new place. What I want to do is draw a new circle at that position, not move the old one.</p>
  
  <p>I'm using some standard code that is being used in many examples around the net...</p>
  
  <pre><code>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  {
  UITouch *theTouch = [touches anyObject];
  
  startPoint = [theTouch locationInView:self];  
  
  startPoint.x -= 20;
  startPoint.y -= 20;
  
  [self setNeedsDisplay];
  }
  
  - (void)drawRect:(CGRect)rect
  {
  // Drawing code
  
  CGContextRef context = UIGraphicsGetCurrentContext();
  
  CGContextSetLineWidth(context, 2.0);
  
  CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
  
  CGRect rectangle = CGRectMake(startPoint.x,startPoint.y,25,25);
  
  CGContextAddEllipseInRect(context, rectangle);
  
  CGContextFillEllipseInRect(context, rectangle);
  
  CGContextStrokePath(context);
  
  }
  </code></pre>
  
  <p>I know this is probably a pretty noob-ish question :)
  Also, if anyone could point in the direction of a tutorial or something explaining how to save my image afterwards, that would be really helpful as well...</p>