Im my MKMapView
, I have a callout of an MKAnnotationView
that works fine most of the time and looks like this:
The icons in the callout are buttons.
The problem:
In this case, hidden by the callout, there is an annotation on the map, exactly behind of a button. When I tap on this button, the AnnotationView behind the button gets the touch event. When I tap on a button without an annotation behind, the button gets the touch event.
I found this out using the accepted answer of How to debug who is eating my touches in UIKit?
How can I make sure that a touch on a button in the callout doesn't get eaten by an MKAnnotationView
that is rendered behind the callout?
There is very much code and at the moment I have no idea which code is relevant to show to you.