I use following code to detect touch event.
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:self];
NSInteger nData[MESSAGE_DATA_LENGTH];
[self generateTouchEvent:touches withEvent:event Data:nData];
KWApp_touchMove( nData );
NSLog( @"NS->X:%f Y:%f", touchPoint.x, touchPoint.y );
}
` I found the X is OK, but Y is from -8 to 471 not 0 to 479 as I expect. And I remembered that I tested it before, and I got 0 to 479. I google this issue, only found one post of it: http://stackoverflow.com/questions/2733868/can-ipad-iphone-touch-points-be-wrong-due-to-calibration. It looks that there is no answer for the issue. And I am surprise that no other people report it. I have tested it on my 3Gs with iOS4.0.1, and iTouch 2G with iOS 3.1.3, both of them has this issue.
Any one know some hints of it? Thanks.