- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped: (UIControl *)control{
NSL开发者_运维问答og(@"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];
}
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.
精彩评论