私のアプリケーションでは、ビューに Google マップを追加しました。
I want to know the touch point on the mapView / myView,
どこで録音したの
そのため、次のようにロジックを実装しました。
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
CGPoint touchPoint = [[touches anyObject] locationInView:mapView_];
CGPoint touchPoint2 = [[touches anyObject] locationInView:self.view];
NSLog(@"========== %@", NSStringFromCGPoint(touchPoint));
NSLog(@"========== %@", NSStringFromCGPoint(touchPoint2));
//UITouch *touch = [[event allTouches] anyObject];
//CGPoint touchPoint = [touch locationInView:touch.view];
}
ただし、最初のタッチでのみ機能し、次のタッチ イベントからはこのメソッドは呼び出されません。
何が問題なのか分からなかった