When a use selects an annotation in a map, I show a bottom view with informations, such as the google maps app. I'm showing it in the map's delegate :
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
When the user deselects it (by taping anywhere on the map), I hide my bottom view. This is done in the opposite delegate method :
- (void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view
It works well, I'm happy with it. However, if a user selects a second annotation (ie: he taps a first annotation, then taps another one, without deselecting first the annotation in the meantime), I don't want to hide my bottom view then show it again. I'd just like to change informations in it.
However, as mapView:didDeselectAnnotationView:
is called before mapView:didSelectAnnotationView:
, I can't figure out how to detect the situation I'm describing above.
My question is : how can I detect that a user selects a second annotation OR, how should I solve this problem in any other way ?