I have a situation in my app where I want to disable annotation deselection (other than when selecting another), so when I tap anywhere that is not an annotation view, it should leave the currently selected annotation as is. If I tap on another annotation view, it should select that one and deselect the other.
I was hoping to find something along the lines of a willDeselectAnnotationView
in the MKMapViewDelegate
or an isDeselected
in MKAnnotationView
, but there's unfortunately no such thing. I also tried overriding deselectAnnotation
in a custom subclass of MKMapView
, but it seems the tap triggered deselect doesn't invoke that function.
Is it possible to disable annotation deselection while preserving the ability to select? Thanks!