0

I have a map viewcontroller A and another viewcontroller B on top of A. I made viewcontroller B a transparent background to see the map in A. Between the navbar and bottom toolbar of B, I want to be able to move the map in A. The problem is, the touches in B doesn't arrive on Viewcontroller A. How can I make it possible to delegate the touches from B to A? I've seen examples based on UIView, but it didn't work for me so far.

Here is an image for a visual presentation:

enter image description here

The red arrows are the touch events I want to pass through to the underlying ViewController A.

I tried the solution in on this stackoverflow question but that didn't work for me. Whatever I tried, ViewController A doesn't receive the touch events if ViewController B is on top of it. I hope you can help me out on this one.

AndaluZ
  • 1,410
  • 3
  • 15
  • 33
  • What **B** does? Any user interaction controls there which should remain working (respond to touches) or should it _pass_ all touches, ...? – zrzka Jun 05 '20 at 21:05
  • It should pass touches in some area in ViewController B, like between navbar and bottom toolbar, to ViewController A. – AndaluZ Jun 07 '20 at 14:09
  • One more question - how is the view controller **B** presented? Is it a child view controller of **A**? Is it a modal over **A**? How the whole view hierarchy looks like? – zrzka Jun 08 '20 at 14:40
  • ViewController is presented as a Modal viewcontroller by using: [self performSegueWithIdentifier:@"SegueViewControllerB" sender: self]; It's ViewController over another ViewController, whether it's modal or not, it doesn't matter imo. – AndaluZ Jun 08 '20 at 15:39

0 Answers0