MKMapView Clicking on contacts will not call didSelectAnnotationView

I am using mapView and trying to make a popup when you click on the output that is displayed on the map.

Pins can be placed in appropriate places, so I think annotations work, but when I click on a contact, it will not show callouts. I have callout = YES.

The didSelectAnnotationView method does not call at all when I click on a contact.

Are there any general problems that might cause this method to be called?

+6
source share
1 answer

If clicking on a contact does not show callouts, even if canShowCallout is YES , then the title annotation is probably nil or empty.

If title empty, the leader will not be displayed and the didSelectAnnotationView delegate method will not be called.

+23
source

Source: https://habr.com/ru/post/922616/


All Articles