title: MKMapView didDeselectAnnotationView interaction with UITableView
body: <p>I have a MKMapView in one of my views with some annotations on it. There is also a hiden UITableView with each cell presenting details of each annotation. When the user selects a certain annotation, the tableView appears and the specific cell gets selected. Also, when a user selects a cell the specific annotation gets selected.</p>
  
  <p>I want the view to have the following behavior: when an annotation is selected and the user taps the map the tableView will disappear but when the user selects another annotation the tableView will stay visible and changes the selected index.</p>
  
  <p>The problem is with the <code>didDeselectAnnotationView</code> method. It gets called before <code>didSelectAnnotationView</code> so when in the method you want to check:</p>
  
  <pre><code>-  (void)mapView:(MKMapView *)mapview didSelectAnnotationView:(MKAnnotationView *)view
  {
       if([mapView.selectedAnnotations count] == 0)
           [self hideTableView];
  }
  </code></pre>
  
  <p>there is no selected annotation at the moment and the tableView gets always hidden.</p>
  
  <p>My question is whether there is a way for the <code>didDeselectAnnotationView</code> to distinguish between the map tapped and the selection of another annotation.</p>
  
  <p>Also, is there any explanation why in an iPhone 3G(4.2.1) <code>didDeselectAnnotationView</code> gets called AFTER <code>didSelectAnnotationView</code>? It seems pretty strange!</p>
  
  <p>Thank you in advance!</p>