Is there a way to know if the MKAnnotationView was selected by the user or programmatically?

65 Views Asked by At

I have a map with annotations, but when I select it programmatically, the map should do one logic on centering. When the user selects it, another logic must be done to center.

Is there a way to know when it is selected programmatically or by the user?

I'm using the following method of the mapView delegate:

public func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
0

There are 0 best solutions below