title: How can i recognize the callout which is been selected in MKMapView?
body: <p>I have a map view on which i am displaying a number of Pin annotation. I have also used the callout on these pins so now when somebody clicks on those pins a callout appears with the detail about that place and now i want to recognize the callout and push another view specific to that.
  Here's the code:</p>
  
  <pre><code>-(void)configureView:(NSDictionary *)serverResult {
  
      // Get the set of projects from the project list
      [spinner stopAnimating];
      NSSet * projects = [[serverResult valueForKey:@"Map"] valueForKey:@"projects"];
      NSLog(@"Map got %d projects", projects.count);
  
      mapView.showsUserLocation = YES;
      mapView.delegate = self;
  
      MKCoordinateRegion newRegion;
      MKCoordinateSpan span;
      span.latitudeDelta=130.0;
      span.longitudeDelta=130.0;
      collection = [[NSMutableArray alloc]init];
      // Iterate over the set of projects
      for (NSManagedObject *project in projects) {
  
          // Get the set of locations for the current project
          NSSet *locations = [project valueForKey:@"locations"];
          int i =0;
          for (NSManagedObject *location in locations) {
              NSString * projectId = [projects valueForKey:@"id"];
              NSString * lat = [location valueForKey:@"latitude"];
              double lati = [lat doubleValue]; 
              NSString * lang = [location valueForKey:@"longitude"];
              double longi = [lang doubleValue];
              CLLocationCoordinate2D annotation = mapView.userLocation.coordinate; 
              annotation.latitude= lati;
              annotation.longitude= longi;
              newRegion.span=span;
              newRegion.center=annotation;
              geoCoder=[[MKReverseGeocoder alloc] initWithCoordinate:annotation];
              geoCoder.delegate=self;
              [geoCoder start];
              [self.mapView setRegion:newRegion animated:YES];
              i= i +1;
          }
      }
      [self.view addSubview:mapView];
      [self.view addSubview:segments];
  }
  
  - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
      NSLog(@"Reverse Geocoder Errored");
  
  }
  
  - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
      NSLog(@"Reverse Geocoder completed");
      mPlacemark=placemark;
      [mapView addAnnotation:placemark];
  }
  
  - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;) annotation{
      MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"];
      annView.animatesDrop=TRUE;
      annView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
      annView.canShowCallout = YES;
      annView.enabled = YES;
      return annView;
  }
  - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
  {
      AllDetailDashboard *summary = [[AllDetailDashboard alloc] initWithNibName:@"View Controller" bundle:nil];
      //Want to write some code here to recognize which project is clicked, in AllDetailDashBoard class we have a variable called project id which is used to recognize the project but i am not able to fetch the project id for specific project which is clicked here
      [self.navigationController pushViewController:summary animated:YES];
      [summary release];
  }
  </code></pre>
  
  <p>Is there any other delegate method which i need to use to recognize the callout.
  Now on click of callout i want to send the projectId to the AllDetailDashBoard.</p>
  
  <p>Thanks,</p>