title: Objective C: Start Point and End Point
body: <p>i am making a drawing with finger app.</p>
  
  <p>I want to set a start point and end point.</p>
  
  <p>My project is like this, it has a background that will tell you the direction to draw. when the user hits the end point the background will change.</p>
  
  <p>i tried this...
  On touches began...</p>
  
  <pre><code>    drawPoint = [touch locationInView:self.view];
      CGRect writingStartPoint = CGRectMake(90, 800, 30, 30);
      CGRect writingEndPoint = CGRectMake(390, 800, 30, 30);
  
      if (CGRectContainsPoint(writingStartPoint, drawPoint))
      {
          //something
      }
  
     if (CGRectContainsPoint(writingEndPoint, drawPoint))
          {
              //change background
          }
  </code></pre>
  
  <p>it's not working.</p>
  
  <p>Is there another way?</p>