title: How to update my custom UIView with drawRect?
body: <p>I'm trying to build some iOS apps while learning and am having some trouble understanding the proper way to do this.</p>
  
  <p>What I have currently is a view that is a subclass of UIView. It is clear and I want to use it as a drawing surface. It will sit on top of something else, like tracing paper.</p>
  
  <p>The user should be able to click on one spot then another spot and a line should draw between the 2 points. I'm getting the touch data, I have the points, and I am able to draw stuff from inside of drawRect: initially.</p>
  
  <p>The problem is I'm not sure how to update stuff later. When everything loads up and drawRect: is calle, it will draw a line just fine. But how do I make it draw new stuff or alter stuff that is already drawn based on what the user is doing. I know I need to call setNeedsDisplay, but not how to get the data to the view to draw stuff.</p>
  
  <p>I've read a bunch of tutorials/examples and they all stop at "Override drawRect: and draw some stuff... done!". How do I pass data down in to the view to tell it "hey, redraw this stuff and add this new line".</p>
  
  <p>Or am I going about this all the wrong way?</p>
  
  <p><strong>EDIT:</strong>
  I'll try to explain better the setup I have.</p>
  
  <p>I have a VC. Inside this VC's view I have a toolbar at the bottom. The rest of the area is taken up by 2 views. One is an image view that holds a reference image. One is the custom view that is clear (tracing paper) that sits at the top. They click a button on the toolbar which turns on a gesturerecognizer. They click on the screen, and I collect the tap data, turn off the gesturerecognizer and HOPEFULLY draw a line. I've got it all working except the drawing part.</p>