This is not what happens if you place the view in front of another, the rear view will not get clicked.
You can disable user interaction in fron view, so feedback will get contact.
but I think that you want the front panel and the feedback to be interactive, what you need to do in this case - touch and send it in the opposite direction and process it in the opposite direction.
I don’t know what you are trying to do, but I think you can probably do a better option than this.
You can see this question here in stackoverflow: detect a touch on a view after another view?
EDIT:
You have many opportunities to send touches.
You can do something like (this is not very good):
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ for (UITouch *touch in touches) { for(UIView* v in self.view.subviews){ if([v pointInside:[touch locationInView:self.view] withEvent:event]){ if ([v isKindOfClass:[UIButton class]]) { [(UIButton*)v sendActionsForControlEvents:UIControlEventTouchUpInside]; } } } } }
You can also edit the view frame so that the view is not closed by the button.
You can also bring you a button on the front of the new view by doing something like:
[self.view addSubview:yourSubview]; [self.view bringSubviewToFront:yourButton];
You just need to use your creativity;)
source share