title: Forwarding touch events only to the views being touched
body: <p>I have a UIWindow with a text field, a button, and a table.
  I would like to be able to track all the touches on the screen and then forward them to the element being touched.</p>
  
  <p>I have read about overriding <code>sendEvent</code> in the <a href="http://developer.apple.com/library/IOs/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MultitouchEvents/MultitouchEvents.html" rel="nofollow">Apple documentation</a> but I still do not understand:</p>
  
  <ol>
  <li>How to use <code>hitTest</code> to retrieve the element being touched</li>
  <li>How to forward touches</li>
  </ol>
  
  <p>This is what I have so far.</p>
  
  <pre><code>- (void) sendEvent:(UIEvent *)event
  {
  
      for (UITouch *touch in [event allTouches])
      {
          /* Get coordinates of touch */
          CGPoint point = [touch locationInView:self];
  
          /* Get subview being touched */
          /* something like this???
             UIView *receiver = [self hitTest:point withEvent:event];            
           */
  
          /* Forward touch event to right view */
          /* how??? */
  
      }
  
      [super sendEvent:(UIEvent *)event];
  }
  </code></pre>
  
  <p>Thank you.</p>