title: MKMapView Annotation Callout Button to DetailView?
body: <p>I have annotations in a MKMapView with Callouts. In this Callouts there's a "Right-Arrow" Button. When clicking on it, I want to open a Detail View, an extra UIViewController with its own nib file etc. I use following code: </p>
  
  <p>In my MapViewController:</p>
  
  <pre><code>- (void)showDetails:(id)sender {
      // the detail view does not want a toolbar so hide it
      [self.navigationController setToolbarHidden:YES animated:NO];
      NSLog(@"pressed!");
      [self.navigationController pushViewController:self.detailViewController animated:YES];
      NSLog(@"pressed --- 2!");
  }
  
  - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(Annotation *) annotation {
  
      if(annotation == map.userLocation) return nil;
  
      static NSString* AnnotationIdentifier = @"AnnotationIdentifier";
  
  
      MKPinAnnotationView* customPinView = [[[MKPinAnnotationView alloc]
                                             initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier] autorelease];
      customPinView.pinColor = MKPinAnnotationColorRed;
      customPinView.animatesDrop = YES;
      customPinView.canShowCallout = YES;
  
      UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
      [rightButton addTarget:self
                                      action:@selector(showDetails:)
                  forControlEvents:UIControlEventTouchUpInside];
      customPinView.rightCalloutAccessoryView = rightButton;
  
      UIImageView *memorialIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"googlemaps_pin.png"]];
      customPinView.leftCalloutAccessoryView = memorialIcon;
      [memorialIcon release];
  
      return customPinView;
  
  
  }
  </code></pre>
  
  <p>The button works, because when I give a NSLog inside the showDetais method, it's printed to the console. The problem is, that NOTHING happens. When clicking the button, it's like there isn't any button. There's no debug error or exception, just nothing.</p>
  
  <p>the MapView header looks  something like this:</p>
  
  <pre><code>@interface MapViewController : UIViewController &lt;MKMapViewDelegate&gt; {
      MKMapView *map;
      NSMutableDictionary *dictionary;
      EntryDetailController *detailViewController;
  }
  
  @property (nonatomic,retain) IBOutlet MKMapView *map;
  @property (nonatomic,retain) IBOutlet EntryDetailController *detailViewController;
  </code></pre>
  
  <p>Maybe someone of you can help me :)</p>
  
  <p>Thanks!</p>