uiview の位置 (y = -50) を変更した後、シングル タップが追加されたサブビューの位置に収まりません。Hittest は、タッチビューが 0 ではなく -50 から始まることを意味します。これを修正するにはどうすればよいですか?
myview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, -50, mywidth, myheight)];
シングルタップ:
// SINGLE TAP
- (void)singleTapRecognized:(UIGestureRecognizer *)gestureRecognizer {
CGPoint touchPoint = [gestureRecognizer locationInView:self.view];
UIView *touchView = [myview hitTest:touchPoint withEvent:nil];
NSLog(@"Y touchPoint: %f",touchPoint.y);
NSLog(@"Y touchView: %f",touchView.frame.origin.y);
}