- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped: (UIControl *)control{
NSLog(@"Disclosure button pressed");
DetailView *tmpView = [[DetailView alloc]initWithNibName:@"DetailView" bundle:nil];
self.detailViewController = tmpView;
[self.navigationController pushViewController:self.detailViewController animated:YES];
//[self.view addSubview:detailViewController.view];
[tmpView release];
}
– (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped: (UIControl *)control{ NSLog(@Disclosure button pressed); DetailView *tmpView =
Share
Are you sure the navigation controller exists in current view controller from where you click on the map annotation? Make sure self.navigationController is not nil.