Touch event for subview

Touch event for subview
0

Hello , i have the following problem.

I am develop AR app and i have an subview contain AR VIEW , every is okay except touch events are swallowed for eaglview and not reach to ARVIEW. I test bringtofront ARVIEW and the touches working fine, the problem is when the eaglview is in the top of stack in rootViewController.

Any have idea how propagate touches to subviews.

Thnaks

Tell us more about what type ARView is and where you are using it.

I use ARSCNView

I added to my project in this way:

   CCEAGLView* eaglview = (__bridge CCEAGLView*)Director::getInstance()->getOpenGLView()->getEAGLView();
        eaglview.opaque = NO;
 UIViewController* rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
        // view is attribute of type ARSCNView in ARViewController
         ARViewController* arvc = [[ARViewController alloc] init];
        [rootViewController addChildViewController: arvc];
        [rootViewController.view addSubview: arvc.view ];
        [rootViewController.view sendSubviewToBack:arvc.view];

Oh what version of the engine are you using?

I use 3.17.2

I haven’t paid attention to Objective-C in a few years, but when I was trying to see how this might happen, I found this: https://stackoverflow.com/questions/16067865/propagating-touch-events-through-sibling-subviews

Perhaps it is of use to you.