I can't figure out how enable iOS to pass events from a childViewController down to its parentviewcontroller.
My childviewcontroller is like an overlay it's root view is transparent and it's opaque views cover a dynamic area - potentially the the entire parentviewcontroller (thus the root view of the childviewcontroller has the same frame as the parent).
Though only the opaque part of the childViewController's views should receive events. All other events I would like to get forwarded in the responderChain down to the parentviewcontrollers views. Just as if all views were sharing one viewcontroller.
I have made an instance of this class:
@interface SilentView : UIView
@end
@implementation SilentView
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self) {
return nil;
}
return hitView;
}
@end
the rootview of my childViewController. That works for me.