views:

58

answers:

1

I am using in one parentview - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event to findout hit when the user touches the view.it works fine.it returns childview correctly.I move those views in the parent view.but I added UIGestureRecogniser to the subview for dragging inside subview .but when i drag inside the subview , it takes hitTest Method and it moves...the dragging event is not fired...any help please?

+1  A: 

I think you should store the position of the touch down event.

Let the UIGestureRecogniser work on the parent view, and transpose the results to the subview. The dragging events will still be fired to the parent view but using the previously stored point, you can track the gesture manually(some relative computation)

Meir Assayag

Meir Assayag
how can i detect touch on one specific view among multiple views instead of using hitTest as you have told....
Mikhail Naimy