I have 3 UIViews, layered on top of one large uiview. I want to know if the user touches the top one and not care about the other ones. I will have a couple of buttons in th
In my case the UIView I wanted to find was not returned by the hitTest. But the following code worked better:
CGPoint locationPoint = [[touches anyObject] locationInView:self.view];
CGPoint viewPoint = [myImage convertPoint:locationPoint fromView:self.view];
if ([myImage pointInside:viewPoint withEvent:event]) {
// do something
}