I have the following setup.
+- XXXCustomControl : UIControl -------+
| A |
| +- ContentView -------------------+|
| |
Use this in super view, without changing subviews code (since subviews may be introduced from other frameworks or pods):
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *view = [super hitTest:point withEvent:event];
if ([view isDescendantOfView:self])
{
NSLog(@"touched inside");
}
return view;
}