title: Handling Touch Events on iOS devices
body: <p>I am exploring the way touch events are handled on iOS devices. I referred the book: <a href="http://shop.oreilly.com/product/9780596518561.do" rel="nofollow">iOS Open Application Development</a>. Working on that, I am overriding the mouseDown, mouseUp methods and simply displaying the co-ordinates in an alert box. However, the overridden methods never get called. The following is the code for the newView Class that derives from UIView:</p>
  
  <pre><code>-(void) _mouseDown: (GSEventRef) event{
  CGPoint point =GSEventGetLocationInWindow(event);
  UIAlertView* alert;
  NSString* alertString =[NSString stringWithFormat: @"%f %f", point.x, point.y];
  alert = [[UIALertView alloc] initWithTitle:@"Success" message:alertString delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
  [alert show];
  }
  
  -(BOOL) canHandleGestures{
  return YES;
  }
  </code></pre>
  
  <p>Is there any part that I missing ? Also, is there an alternative way of getting information on touch events and handling them ?</p>