My solution for my own question, hope this helps someone.
In the front-panel view, listen for the touchesEnded:withEvent .
When this delegate fires, you know that the user is touching the front view.
Then you need to check if the finger position touches the special areas in the BOTTOM view.
What to do:
1) Convert the point relative to the view from below:
UITouch *touch = [touches anyObject]; CGPoint touchPointInLowerView = [touch locationInView:self.lowerViewController.view]; BOOL isLowerButtonClicked = [self.lowerViewController isFingerOnYourButton:touchPointInLowerView]; if(isLowerButtonClicked) {
2) In the lower view
- (BOOL) isFingerOnYourButton:(CGPoint)point { return CGRectContainsPoint(self.aButton.frame, point); }
voila. Thus, we can detect clicks in the lower view, even if it is blocked by another interactive view from above.
mkto source share