Depends on what you want to do. If you want the view manager to know that something has happened in the child of the UIView, you must pass the delegate of the main view controller to the child view (object-oriented programming path). Something like that:
...
id<mainControllerDelegate> _mainControllerDel;
...
-(void)gestureHappened
{
[_mainControllerDel gestureHappenedInView];
}
But if you want both views to respond to the gesture, you should use the gesture delegation method shouldRecognizeSimultaneouslyWithGestureRecognizer , for example:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
return YES;
}
EDIT:
, touchesBegan ( ), . . , iOS. , , . :
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
[self.nextResponder touchesBegan:touches withEvent:event];
}
, , :
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[_mainControllerDel touchBeganOnView: self withEvent: event];
}