I am sure this problem will be easily resolved, but I am relatively new to iOS development. I am trying to handle passing touch events for children that are lower in drawing order on a UIView. For instance -
I am creating an advanced UIImageView to create my MoveableImage class. This class is basically a UIImageView that implements the Began, touchEnded, and touchhesMoved touches -
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self showFrame];
if([[event allTouches]count] > 1)
{
return;
}
UITouch *touch = [[event touchesForView:self] anyObject ];
CGPoint colorPoint = [touch locationInView:self];
CGPoint touchPoint = [touch locationInView:self.superview];
UIColor *color = [self colorOfPoint:colorPoint];
[color getRed:NULL green:NULL blue:NULL alpha:&touchBeganAlpha];
NSLog(@"alpha : %f",touchBeganAlpha);
if(touchBeganAlpha > 0)
{
[self animateFirstTouchAtPoint:touchPoint];
}
else {
[super.nextResponder touchesBegan:touches withEvent:event];
}
}
Thus, the end result is basically this: if they touch the frame of the image, and not the image inside another image that will be under it, it may respond. See this image for an example.

So far I have tried the following responder, however this does not solve the problem. Any help would be greatly appreciated!
- touchhesBegan Moved. Ovveriding pointInside UIView .
-(BOOL) pointInside:(CGPoint)point withEvent:(UIEvent *) event
{
BOOL superResult = [super pointInside:point withEvent:event];
if(!superResult)
{
return superResult;
}
if(CGPointEqualToPoint(point, self.previousTouchPoint))
{
return self.previousTouchHitTestResponse;
}else{
self.previousTouchPoint = point;
}
BOOL response = NO;
if(self.image == nil)
{
response = YES;
}
response = [self isAlphaVisibleAtPoint:point];
self.previousTouchHitTestResponse = response;
return response;
}