I know there are several posts on SE relating to this issue but I couldn't get around them to find a proper solution for my situation.
I've a map view inside a view controller. I'm presenting another view controller with modalPresentationStyle
set as custom
(housing the card view) on top of the map view VC:
What I want for this scenario is that the map view to still be able to recognise touches when the location card view is presented along with the location card still recognising touches inside itself. Like how Apple Maps functions when the below list view is presented.
I know I can't pass touches through view controllers but I can't decide in between:
- dumping the location card into the map view which I'll highly dislike,
- presenting the location card via
addChildViewController
which I'm not quite sure how to implement in order to achieve the effect I want.
This SE question gives a detailed answer and a small sample project on mimicking Apple Maps' interface although I still can't figure out how to solve my issue.